[Discuss] file system hierarchy.

pw p.willis at telus.net
Tue Oct 16 09:14:45 PDT 2007


chris wakefield wrote:
> Hello all.
> I'm looking for a command line program that will display a file system 
> hierarchy.  I guess something like pstree would be nice.
> At a glance, I'd like to be able to see what directories are on which drive, 
> etc.
> Thanks,
> Chris W.
> _______________________________________________
> Discuss mailing list
> Discuss at vlug.org
> http://ladybug.vlug.org/cgi-bin/mailman/listinfo/discuss
> 



export DD=`pwd`;find -type d | sed -e "s/\.\//\//g" |awk -F "/" 
'{for(i=1;i<=NF;i++){spc="";for(j=0;j<i;j++){spc=sprintf("%s+",spc);};t="";for(j=1;j<i;j++){t=sprintf("%s",spc);}t=sprintf("%s%s",t,$i);print 
t;}}'|less


all on one line.

Remove '| less' and just redirect into a file
and then sort the file.

Or, just modify the script to make it completely like
pstree.

Peter


More information about the Discuss mailing list