Skip to main content

All Questions

Tagged with
3 votes
1 answer
386 views

Odd behavior by 'du' with `dd` on a BTRFS disk showing 0 filesize.. Anyone got some clues or thoughts around it?

Been tinkering with btrfs with consideration of moving from ext4 to that. However, when wanting to compare R/W speeds, I seem to have come across an (to me at least) unusual behavior by du on the ...
DhP's user avatar
  • 243
1 vote
0 answers
2k views

BTRFS discrepancy between df and du

the difference between disk usage reported by df and du makes 20% of capacity of my drive. It is ubuntu-type btrfs filesystem with @ and @home. Where could be the problem please? df -h /dev/sda2 ...
Jan's user avatar
  • 377
0 votes
1 answer
598 views

Why do du -s * and du -s . show vastly different sizes?

I ran both du -sh . and du -sh * inside a directory, but the values returned by the second one don't add up to nearly the same value reported by the first. 5.7GB vs 1.5 GB. Why is this? Are there some ...
The Bic Pen's user avatar
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
4 votes
3 answers
2k views

Get the total size of all files of a given extension

I'm trying to get the total size of all the JPEGs in a particular folder, but no amount of combinations of options while piping to du seems to make this work: find -type f -iname "*.jpg" | du -sch ...
Hashim Aziz's user avatar
  • 13.1k
1 vote
0 answers
216 views

"du" command on Windows10 under MSYS2 gives "fts_read failed" error on USB formatted as exFAT/FAT32

I'm currently using MSYS2 on Windows10 and I tried to execute du in the MINGW64 Shell Launcher on a USB formatted as exFAT. Assuming the USB is mounted on /g/, the structure of the USB is pretty much ...
AlbyTree's user avatar
2 votes
3 answers
5k views

Folder is empty, but du reports high usage

I have a 115GB partition on my hard disk (output of cgdisk /dev/sda is below): Part. # Size Partition Type Partition Name --------------------------------------------------------...
Farzad's user avatar
  • 155
5 votes
1 answer
967 views

Why does du -b show a different result than stat?

I've recently ran into this problem: find /tmp/tmp33hn25wv -type f -exec stat --format='%s' {} + | awk '{s+=$1} END {print s}' 10420224 du -bs /tmp/tmp33hn25wv 12198004 /tmp/tmp33hn25wv Results ...
wvxvw's user avatar
  • 885
1 vote
0 answers
1k views

Difference between du -sh */ and du -hd 1

I tried to find out how big each directory in my root-directory is. I cd'ed to / and did: ls | xargs du -sh the result: ... 1.9M tmp 975M usr 70G var ... Then I went to /var/www and did: ...
JLix's user avatar
  • 11
7 votes
3 answers
8k views

du -x still examines mounted filesystems when using wildcards

If I try du -s -h -x /* it will try to examine all filesystems (real and pseudo) mounted directly under /, e.g. /dev, /proc, /sys, /run, and /home (/home is on an extra partition). I think it comes ...
Markus N.'s user avatar
  • 585
1 vote
1 answer
4k views

Why directories size are different in ls -l output on XFS file system?

I can't understand why ls -l shows folder size less than block size. For example: [user@01 NEW]$ ls -l total 4 drwxr-xr-x 5 root root 78 Apr 22 00:43 controllers drwxr-xr-x 14 root root 4096 Apr ...
loadaverage's user avatar
34 votes
8 answers
32k views

du which counts number of files/directories rather than size

I am trying to clean up a hard drive which has all kinds of crap on it accumulated over the years. du has helped reduce disk usage, but the whole thing is still unwieldily not due to the total size, ...
Jesse's user avatar
  • 843
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
4 votes
4 answers
6k views

How does du determine which hard link to disregard?

We have two directories: $ ls -l total 8 drwxr-x--- 2 nimmy nimmy 4096 Nov 15 19:42 jeter drwxr-x--- 2 nimmy nimmy 4096 Nov 15 19:42 mariano I create one file in the first folder: $ dd if=/dev/zero ...
Belmin Fernandez's user avatar