Last active
August 29, 2015 14:04
-
-
Save amaudy/bfce1a4ad9669df17de1 to your computer and use it in GitHub Desktop.
Bash script that often use.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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