Showing posts with label difference in size. Show all posts
Showing posts with label difference in size. Show all posts

Friday, February 7, 2014

Different file size on server and local file system

I got a case when file on server (Solaris) have different size from what I have on Local PC (Ubuntu 12.04),

[user@server ~]$ du -h /var/tmp/file.csv
548K    /var/tmp/file.csv
[roman@laptop ~]$ du --apparent-size -h /var/tmp/file.csv
1.9M    /var/tmp/file.csv

[user@server ~]$ ls -lh /var/tmp/file.csv
-rw-r--r-- 1 sb sb 1.9M Feb  7 13:59 /var/tmp/file.csv
[user@server ~]$ du -h /var/tmp/file.csv
548K    /var/tmp/file.csv
[user@server ~]$ du --apparent-size -h /var/tmp/file.csv
1.9M    /var/tmp/file.csv

from man:
    --apparent-size
              print apparent sizes,  rather  than  disk  usage;  although  the
              apparent  size is usually smaller, it may be larger due to holes
              in (`sparse') files, internal  fragmentation,  indirect  blocks,
              and the like