`ls -l` shows size of file other than of the folder?
Chuck Swiger
cswiger at mac.com
Wed Jun 13 22:55:54 UTC 2012
Hi--
On Jun 13, 2012, at 1:23 PM, Peter Vereshagin wrote:
> I have the directory in the file system with 2 regular files each of which is
> sized as 700M according to 'ls -l'. But the torrent client and 'du -s' and 'ls
> -l's 'total' show that the directory size is 300M.
>
> How can that be? Are there different file sizes stored on a ufs1 in their
> metadata?
It's very likely that these are sparse files. Your torrent client creates a file
of the appropriate size via fseek()/lseek() or similar, but the space isn't actually
consumed until it writes the data it is obtaining from the network....
Random link: http://www.unixguide.net/unix/sparse_file.shtml
Regards,
--
-Chuck
More information about the freebsd-questions
mailing list