Saturday, January 10, 2015

linux - What causes files to use up more more disk space than the file size suggests?

du was showing some drives with much less space than I was expecting, and ls -alh also showed the sum at the top to be a factor of three more than the sum of the individual files. Following this answer, I checked with ls -s, and sure enough, most of the files are using three times as much disk space as their size. What causes this and can I do anything to get the disk usage down?



Edit



I'm seeing output like this from ls -alhs:



 50K -rw-------   1 xxx xxx 9.0K Jan 29 20:34 20120103.gz
242K -rw------- 1 xxx xxx 67K Jan 29 20:53 20121130.gz



so the problem isn't that my file sizes are much less than 4k.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...