Skip to main content

All Questions

Tagged with
1 vote
0 answers
88 views

Why `du` output / subdirectory size on disk changes after creating a file in parent directory?

╼ pwd /some/dir ╼ ls ╼ some_script.py --create centos-chroot ╼ ls centos-chroot ╼ du --block-size=1 -s centos-chroot 6320181248 ╼ fallocate -l 36613854208 largefile ╼ ls centos-chroot largefile ╼ du --...
Artalus's user avatar
  • 323
0 votes
2 answers
3k views

How to count total size of directory, and why `du` output differs between copies of directory?

Because I am clearly missing something here: $ cp -a CENTOS-chroot 1 $ cp -a CENTOS-chroot 2 $ cp -a CENTOS-chroot 3 $ cp -a CENTOS-chroot 4 $ du --block-size=1 -s 1 2 3 4 6320304128 1 ...
Artalus's user avatar
  • 323
0 votes
1 answer
5k views

How to calculate exact size of partition and number of inodes to write a directory

I need to write a directory with files (specifically - a Linux chroot) to a file with LVM image on it. The background of task is stupid, but I want to understand what is going on for now. I calculate ...
Artalus's user avatar
  • 323
2 votes
2 answers
1k views

Why doesn't ext4 cache directory size?

Once again I'm cleaning up my desktop because I'm running out of HDD space and everytime I call du -sh ~, it takes a really long time to calculate the current size of the directory. From my ...
d33tah's user avatar
  • 1,404