how to list the number of files in serveral sub-directories
Hello ALL,
I would like to learn how many files there are in respective sub-directories which are under a specified directory with one command. Thanks |
Might be stretching the "one command" part, and I'm not entirely sure of what you are after, but how about:
Code:
echo "$(find . -type f|wc -l) files and $(find . -type d|wc -l) directories" |
In one command is not so easy. If you don't restrict solution only to one-liners:
Code:
for dir in $(find . -mindepth 1 -type d) |
All times are GMT -5. The time now is 01:15 AM. |