Return to Snippet

Revision: 1897
at November 20, 2006 06:43 by priyanhere


Initial Code
F_CNT=0
D_CNT=0
for FILE in *; do
  test -f "$FILE" && F_CNT=`expr $F_CNT + 1`
  test -d "$FILE" && D_CNT=`expr $D_CNT + 1`
done
echo "$F_CNT files & $D_CNT dirs in current directory."

Initial URL
http://snipplr.com/users/priyanhere/

Initial Description

                                

Initial Title
Count files and directories

Initial Tags
unix, linux, files, directory

Initial Language
Bash