Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
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?
user67275's user avatar
  • 243
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 | ...
Tung's user avatar
  • 171
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. ...
Zhyhalo Oleksandr's user avatar