in Microsoft Windows you can right click on a folder for Properties and it will report Contains # files and # folders
Is there a way to do this in linux on the command line?
I want to know the total number of files and the total number of folders under a given folder as well as within any and all subfolders from that starting folder.
find dir ! -type d -exec echo x \; | wc -l
I am getting invalid null command – ron Aug 08 '19 at 15:34-exec printf '%.0s\n' {} +
as seen in the dup to speed it up on non-GNU systems – Stéphane Chazelas Aug 08 '19 at 15:46