klaushaidinger.com

Icon

Get count of files in each directory

Use: for i in `ls -1 .`; do echo -n $i „:  „; find $i|wc -l; done

Delete (really) many files in a directory

You may get an error with "rm", if really many files are deleted - like "arguments too long ..". Use this:

find . -maxdepth 1 -name '*.pdf' -delete