ls -lh show file not displaying correct size

Dan Nelson dnelson at allantgroup.com
Mon Feb 2 11:23:26 PST 2009


In the last episode (Feb 02), Wayne said:
> Thanks for the answer so now for the next question. How do I sync this
> file to other FreeBSD servers. I tried using rsync with the --spares
> but the size on the other server was on it's way to being the 256G size
> and fill up the other server. How would I go about making an exact
> duplicate. 

rsync --sparse seems to work fine for me:

(dan at dan.13) /usr/tmp> truncate -s 512M bigfile1
(dan at dan.13) /usr/tmp> ls -lsk bigfile*
1 -rw-r--r--  1 dan  wheel  5368709120 Feb  2 13:09 bigfile1
(dan at dan.13) /usr/tmp> rsync --sparse -v bigfile1 dan:/usr/tmp/bigfile2
sent 536936517 bytes  received 31 bytes  2958328.09 bytes/sec
total size is 536870912  speedup is 1.00
rsync: U:98.46s S:16.08s E:181.03s CPU:63% Faults:0/1343 I/O:0/0 Swaps:0
(dan at dan.13) /usr/tmp> ls -lsk bigfile*
1 -rw-r--r--  1 dan  wheel  536870912 Feb  2 13:11 bigfile1
1 -rw-r--r--  1 dan  wheel  536870912 Feb  2 13:14 bigfile2
 
-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-questions mailing list