Aug 16, 2004 #1 datadan IS-IT--Management Joined Jul 22, 2002 Messages 283 Location US How do I count the number of files in a directory? Any counting Recurrsively? THanks,
Aug 16, 2004 #2 ericbrunson Technical User Joined Jan 9, 2004 Messages 2,092 Location US ls | wc -l recursively: ls -R | grep -v -e / -e '^$' | wc -l Upvote 0 Downvote
Aug 16, 2004 #3 flugh Technical User Joined Aug 23, 2002 Messages 655 Location US Just because everyone has to respond to shell-related stuff ;-) [tt] find . -type f -print -maxdepth 1 | wc -l [/tt] ---- JBR Upvote 0 Downvote
Just because everyone has to respond to shell-related stuff ;-) [tt] find . -type f -print -maxdepth 1 | wc -l [/tt] ---- JBR
Aug 16, 2004 #4 ericbrunson Technical User Joined Jan 9, 2004 Messages 2,092 Location US Flugh is right and to do it recursively, drop the -maxdepth 1 Upvote 0 Downvote