- Count the number of files in the current directory:
ls -1 | wc -l
ls -l | grep -v ^l | wc -l
Reference: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x700.html - Remove all the files with name XXX* in the current directory:
find . -name “XXX*” -print0 | xargs -0 -I {} rm {} - List the total size of each folder (-s is to list only total size):
du -sh directory
du -h directory
TO BE UPDATED