Count Files/Directories/Links in *nix


for t in files links directories; do echo `find . -maxdepth 1 -type ${t:0:1} | wc -l` $t; done 2> /dev/null


-maxdepth 1 specifies how far to count files

Comments

Popular posts from this blog

Alternatives to: "The quick brown fox jumps over the lazy dog."

Using keys like ALT+TAB in UltraVNC.

Command-line installation of OpenVPN