Đếm số lượng file linux
Recursive:
find DIR_NAME -type f | wc -l
Non-recursive:
ls -1 | wc -l
List number of files in sub dir, recursively
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
Recursive:
find DIR_NAME -type f | wc -l
Non-recursive:
ls -1 | wc -l
List number of files in sub dir, recursively
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr