Tuesday, May 24, 2011

count all files in one folder

Sometimes we want to know how many files in folder using GNU/Linux command, here the code:



$ls -1 targetdir | wc -l 
454
Enjoy.....