Wednesday, April 14, 2010

How Deep Is The Directory Structure

Recently our Netbackup failed due to some very long full-path name, guess what's the max length of the full-path? The length is 1037 character long. Below one-liner can tell you how deep is your directory and the corresponding directory I am running this in my home directory under Cygwin.
$ find /home/user -type d | awk -F"/" '{if(NF>max){max=NF;maxpath=$0}}END{print max-1, maxpath}'
12 /home/user/src/Django-1.1.1/build/lib/django/contrib/gis/db/backend/mysql

Labels:

1 Comments:

Blogger hazz said...

I've found your blog at the first impression very interesting,i'll bookmark it,in the next week i will take a deep look at it.
Thank you for blogging it
Ciao
hazzino@gmail.com

4:29 PM  

Post a Comment

<< Home