Wednesday, 15 April 2015

How to count all files and directories in a Linux directory

count of all files and directories in the current directory - echo * | wc
count of only the directories in the current directory - echo */ | wc
count of just the files in a directory - echo *.* | wc

No comments:

Post a Comment