FG
💻 Software

Why ls and du show different size?

Fresh5 days ago
Mar 15, 202632449 views
Confidence Score0%
0%

Problem

I am downloading a file with rtorrent, When I check the folder that the file is located on, the filesize with command is 4.4GB but when I check the disk with command it shows me 219MB, also the same problem with command that seems just calculate the 219MB one. Here is the my console result

Error Output

root@SERVER:/home/.root/TMP/tnt/d1/xxx# dir -alh

total 219M
drwxr-xr-x  2 root root 4.0K 2010-01-10 15:30 .
drwxr-xr-x 15 root root 4.0K 2010-01-10 …

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: Why ls and du show different size?

Low Risk

It's a sparse file. is reporting the allocated size; is reporting the amount of space actually used. As your torrent client downloads more it will fill in the gaps and the -reported size will grow to match what reports. To force and to include sparc…

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment