5

How to get total size in bytes of all files inside directory?

view full story
linux-howto

http://www.unix.com – Hi! I started my Linux adventure just few weeks ago. Here's my biggest problem yet... :wall: How to get total size in bytes of all files inside directory? So far I've found this solution: du -bs /path_to_my_directory But it's not good. It gives me total size in bytes of all files inside directory and its subdirectories - that's cool - but it also adds the size of the directory itself. So the outcome is 4096 bytes too big (sometimes proportionally more when there's more files). I know it has something to do with file system cluster size or inodes, but I just want to strip the outcome of that (HowTos)