I set up a file server with samba and I'm copying files to it from another computer under the same LAN. I set up SSH server and connected to it with my phone to monitor the process.
This is what I run on my phone in OpenSSH client (the server has GNU Core Utilities installed):
# while :; do du -sh /media/samba; sleep 1; done 288M /media/samba 289M /media/samba 290M /media/samba ... ^C # while :; do du -sb /media/samba; sleep 1; done 328267292 /media/samba 328267292 /media/samba 328267292 /media/samba ... ... (repeated ~30 times) 361334588 /media/samba 361334588 /media/samba ... ... (repeated ~30 times) 403280532 /media/samba 403280532 /media/samba ^C #
The computer (running Windows 10) reports a transfer speed of approx. 1000KB/s and all files are 30~35 MB in size.
From my observation,
du is reporting file size with
-h, but "occupied space" with
So why does
du report different sizes when a file is growing?
du handle options