On 2/22/2017 5:51 PM, Anthony K wrote:> > However, I was trying to compare my system with the OP's and noticed > that I have a directory with >2TB of used capacity in a folder sized > ~36kb - a 56793929:1. In the OP's situation, he has a directory with > ~2.8MB of used capacity in a folder sized ~2MB - a 1:1 ratio. That's > the part I'm confused about. > > Without knowing what the OP's file system but assuming he too is using > EXT4, what would the directory be storing that's so different from mine?a bajillion small files vs a few large ones. worse, if you've created a bajillion files in a directory, the directory grows, even if you delete them, the directory doesn't shrink, at least with the ext? file systems. -- john r pierce, recycling bits in santa cruz
On 02/22/2017 07:02 PM, John R Pierce wrote:>> Without knowing what the OP's file system but assuming he too is >> using EXT4, what would the directory be storing that's so different >> from mine? > > a bajillion small files vs a few large ones.Not to be pedantic, but the size of a directory has nothing to do with the size of the files it contains. It doesn't matter if they're small files or large ones. The only thing that matters is the number of filenames in the directory, and possibly the length of those file names.
On 23/02/17 14:33, Gordon Messmer wrote:> On 02/22/2017 07:02 PM, John R Pierce wrote: >>> Without knowing what the OP's file system but assuming he too is >>> using EXT4, what would the directory be storing that's so different >>> from mine? >> >> a bajillion small files vs a few large ones. > > > Not to be pedantic, but the size of a directory has nothing to do with > the size of the files it contains. It doesn't matter if they're small > files or large ones. The only thing that matters is the number of > filenames in the directory, and possibly the length of those file names.Thanks for setting me straight. I guess the OP must have, like you said, a *bajillion*, puny sized files: $ mkdir junk $ for u in {1..10000}; touch junk/junk-${u}; done $ ls -ld junk drwxr-xr-x 2 akk users 270336 Feb 23 17:19 junk $ du -bs junk 270336 junk