Skip to content

Instantly share code, notes, and snippets.

@amaudy
Last active August 29, 2015 14:04
Show Gist options
  • Save amaudy/bfce1a4ad9669df17de1 to your computer and use it in GitHub Desktop.
Save amaudy/bfce1a4ad9669df17de1 to your computer and use it in GitHub Desktop.
Bash script that often use.
# list and count files in folders
for i in `ls -d */`; do g=`find ./$i -type f -print| wc -l`; echo "Directory $i contains $g files."; done
# list directory name
ls -l | grep ^d | awk '{print $NF}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment