[Discuss] file system hierarchy.
pw
p.willis at telus.net
Tue Oct 16 09:40:37 PDT 2007
pw wrote:
> 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
>
Sorry that should read:
export DD=`pwd`;find -type d | sed -e "s/\.\//\//g"|awk '{print
ENVIRON["DD"] $0}' |awk -F "/"
'{for(i=2;i<=NF;i++){spc="";for(j=2;j<i;j++){spc=sprintf("%s+",spc);};t="";for(j=2;j<i;j++){t=sprintf("%s",spc);}t=sprintf("%s/%s",t,$i);print
t;}}'| less
all on one line.
More information about the Discuss
mailing list