Search This Blog

Monday, November 20, 2006

How to list files in subdirectories

I wrote a shell script which allow to list files and only files in all of subdirectiories of current directory. I don't know if it useful but it nice piece of shell code:
for i in `find $PWD -maxdepth 1 -type d`
    (cd $i; echo $i; find -maxdepth 1 -type f| wc -l)
Post a Comment