[oclug] Directory tree one-(two)-liner
Milan Chytil
mchytil at travel-net.com
Sat Mar 17 14:59:02 EST 2001
Found the following little gem in the O'Reilly book Unix Power Tools:
------------------------
# Original one-liner (hacked up by Jerry Peek):
echo $1; find $1 -type d -print | tr / \\1 | sort -f | tr \\1 / |\
sed -e s,\^$1,, -e /\^$/d -e "s,[^/]*/, \" ,g"
------------------------
It is on the included CD, buried in a more elaborate script called
"stree".
Enjoy!
Milan
--
alternate address: mchytil at ncf.ca
More information about the OCLUG
mailing list