-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

In <[EMAIL PROTECTED]>, Anupam Jain wrote:
>Hi all,
>
>Does anyone know of a way to get the maximum directory nesting,
>starting from the specified base, using standard Linux commands only
>(no php/perl/python etc.)?
>
>e.g. if the directory structure is as follows -
>d1
>->d2
>->->d3
>->->->d4
>->d5
>->->d6
>
>I need a shell script which will give me the answer "4" (i.e. depth of
>the deepest directory - d4).

[EMAIL PROTECTED] ~ % find . -type d -printf '%d\n' |sort -n |tail -1

HTH
- -- 
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkiOu40ACgkQHy+EEHYuXnRZZgCdErdBNfEjwhui1c02QVj6qhL5
8wsAn2tnUozvZ69z2Ewp+IEWAZz4RIFn
=JxVY
-----END PGP SIGNATURE-----

_______________________________________________
ilugd mailinglist -- ilugd@lists.linux-delhi.org
http://frodo.hserus.net/mailman/listinfo/ilugd
Archives at: http://news.gmane.org/gmane.user-groups.linux.delhi 
http://www.mail-archive.com/ilugd@lists.linux-delhi.org/

Reply via email to