Re: ls -lh show file not displaying correct size
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: (d...@dan.13) /usr/tmp> truncate -s 512M bigfile1 (d...@dan.13) /usr/tmp> ls -lsk bigfile* 1 -rw-r--r-- 1 dan wheel 5368709120 Feb 2 13:09 bigfile1 (d...@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 (d...@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 dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: ls -lh show file not displaying correct size
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. Wayne --- On Sat, 1/31/09, Dan Nelson wrote: From: Dan Nelson Subject: Re: ls -lh show file not displaying correct size To: "Wayne" Cc: freebsd-questions@freebsd.org Date: Saturday, January 31, 2009, 3:33 PM In the last episode (Jan 31), Wayne said: > Hello, > > I have a db file of FreeBSD 7.1 amd64 that is displaying the wrong size. This is a db file used by my mail filter software to to Bayes Filtering. > If I do an ls -l or ls -lh I get > filter1# ls -l > total 489024 > -rw--- 1 defang defang 274992627712 Jan 31 08:33 @@RPTN.db > filter1# ls -lh > total 489024 > -rw--- 1 defang defang 256G Jan 31 08:33 @@RPTN.db > If I do a du I gecus18-179# du > 489026 . > cus18-179# du -h > 478M . > My drive is only 250 Gig and I have it mounted as /var/spool here is my df for the whole file system. > /dev/ad14s1d 226G 810M 207G 0% /var/spool > > So I know that the 256G is wrong. Can any one tell me what is up with file size ? The 256G is correct. It's a sparse file (i.e. there are holes in it). "ls -sk" will print the actual disk space occupied by a file. -- Dan Nelson dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: ls -lh show file not displaying correct size
filter1# ls -l total 489024 -rw--- 1 defang defang 274992627712 Jan 31 08:33 @@RPTN.db filter1# ls -lh total 489024 -rw--- 1 defang defang 256G Jan 31 08:33 @@RPTN.db If I do a du I gecus18-179# du 489026 . cus18-179# du -h 478M . My drive is only 250 Gig and I have it mounted as /var/spool here is my df for the whole file system. /dev/ad14s1d 226G 810M 207G 0% /var/spool So I know that the 256G is wrong. Can any one tell me what is up with file size ? no it's right. it's 256G sized but most space unallocated. du shows how many space is allocated. in unix files can have "holes" == blocks that are not allocated to disk___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: ls -lh show file not displaying correct size
In the last episode (Jan 31), Wayne said: > Hello, > > I have a db file of FreeBSD 7.1 amd64 that is displaying the wrong size. This > is a db file used by my mail filter software to to Bayes Filtering. > If I do an ls -l or ls -lh I get > filter1# ls -l > total 489024 > -rw--- 1 defang defang 274992627712 Jan 31 08:33 @@RPTN.db > filter1# ls -lh > total 489024 > -rw--- 1 defang defang 256G Jan 31 08:33 @@RPTN.db > If I do a du I gecus18-179# du > 489026 . > cus18-179# du -h > 478M . > My drive is only 250 Gig and I have it mounted as /var/spool here is my df > for the whole file system. > /dev/ad14s1d 226G 810M 207G 0% /var/spool > > So I know that the 256G is wrong. Can any one tell me what is up with file > size ? The 256G is correct. It's a sparse file (i.e. there are holes in it). "ls -sk" will print the actual disk space occupied by a file. -- Dan Nelson dnel...@allantgroup.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
ls -lh show file not displaying correct size
Hello, I have a db file of FreeBSD 7.1 amd64 that is displaying the wrong size. This is a db file used by my mail filter software to to Bayes Filtering. If I do an ls -l or ls -lh I get filter1# ls -l total 489024 -rw--- 1 defang defang 274992627712 Jan 31 08:33 @@RPTN.db filter1# ls -lh total 489024 -rw--- 1 defang defang 256G Jan 31 08:33 @@RPTN.db If I do a du I gecus18-179# du 489026 . cus18-179# du -h 478M . My drive is only 250 Gig and I have it mounted as /var/spool here is my df for the whole file system. /dev/ad14s1d 226G 810M 207G 0% /var/spool So I know that the 256G is wrong. Can any one tell me what is up with file size ? Thanks Wayne ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"