All Questions
3 questions
2
votes
3
answers
3k
views
Print number of files excluding directories [duplicate]
I learned that 'ls | wc -l' command prints number of files in the current directory, but it includes all files and directories.
Can I do the same task only for pure files excluding directories?
2
votes
3
answers
1k
views
Determine the number of directories inside a tar file without extracting it
I need to count directories inside an archive file (e.g. tar.bz) without extracting the archive. Note that the archive is too big so that it will be hard to extract then count directories using ls | ...
1
vote
4
answers
6k
views
Count number of directories
I need a script or command that prints a number of directories which name begins from "lib" in whole directory subtree. I was trying to do it using find, grep, and wc but can't scan all directories. ...