Hello
I was copying some files from one server to other, that I relized the total file size ( sum of all files ) in one server is a bit more than the one that copied from ( about 6 when I do du -s )
individual file sizes are identical, when I do one by one file comparison, but the sum is different.
is there any more accurate way to make sure of integrity of the file. ( other than pgp or signature )
Thanks
On Sun, 2007-10-14 at 16:30 -0400, centos@unixplanet.biz wrote:
Hello
I was copying some files from one server to other, that I relized the total file size ( sum of all files ) in one server is a bit more than the one that copied from ( about 6 when I do du -s )
That's not unusual. It's often the case that some partial blocks (e.g block 4096, 1K used) exist on the source. Sometimes these are consolidated to make more "full" blocks ase they are copied to someplace else.
individual file sizes are identical, when I do one by one file comparison, but the sum is different.
is there any more accurate way to make sure of integrity of the file. ( other than pgp or signature )
md5sum?
Thanks
<snip sig stuff>
-- Bill
On Sun, 14 Oct 2007 16:30:16 -0400 centos@unixplanet.biz wrote:
is there any more accurate way to make sure of integrity of the file.
man sha1sum
You can create a list of the checksums as a text file and have sha1sum read that list back on the other end and check the files against it.
On Sun, Oct 14, 2007 at 04:30:16PM -0400, centos@unixplanet.biz wrote:
Hello
I was copying some files from one server to other, that I relized the total file size ( sum of all files ) in one server is a bit more than the one that copied from ( about 6 when I do du -s )
"du" takes into account block sizes and so on, so may not be the same on two different machines. "ls -l" shows the exact size per file.
is there any more accurate way to make sure of integrity of the file. ( other than pgp or signature )
md5sum will generate an MD5 checksum on each file. It's typically what is used by larger FTP sites to ensure you've downloaded a non-corrupt file. It's _possible_ for two seperate files to have the same checksum but the chances of this happening by accident are 1 in 2^128 - very unlikely :-)
On Sun, Oct 14, 2007, Stephen Harris wrote:
On Sun, Oct 14, 2007 at 04:30:16PM -0400, centos@unixplanet.biz wrote:
Hello
I was copying some files from one server to other, that I relized the total file size ( sum of all files ) in one server is a bit more than the one that copied from ( about 6 when I do du -s )
"du" takes into account block sizes and so on, so may not be the same on two different machines. "ls -l" shows the exact size per file.
There may also be differences if the file system types are different between the systems (e.g. reiserfs vs ext3).
There is overhead on all file systems, so that a fresh, empty file system will have less free space than one might expect based on the size of the disk, number of sectors, and block size.
I would expect that a newly built file system would have more available space after loading files from another system would have a bit more free space, all other things being equal, because new files would likely be in contiguous space, not spread about as may happen with growing database files.
Bill -- INTERNET: bill@celestial.com Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676
You know the one thing that's wrong with this country? Everyone gets a chance to have their fair say. -Bill Clinton, May 29, 1993, The White House
On Sunday 14 October 2007, centos@unixplanet.biz wrote:
Hello
I was copying some files from one server to other, that I relized the total file size ( sum of all files ) in one server is a bit more than the one that copied from ( about 6 when I do du -s )
You can use dd with the right options:
du --apparent-size -B 1
this will count blocks of size 1 byte and take the used size by the files rather than the allocated blocks.
Peter.
On Sunday 14 October 2007, centos@unixplanet.biz wrote:
Hello
I was copying some files from one server to other, that I relized the total file size ( sum of all files ) in one server is a bit more than the one that copied from ( about 6 when I do du -s )
No one has yet to say this straight out. "du -s" does _not_ show the sum of filesizes. As the name implies (DiskUsage) shows the amount of disk space needed to store the file (which is typically the filesize + some small amount).
/Peter
Hello
Is there any way to find out which files are in swap space ?
is there any proc option that we can see the current and real time swaped files.
Thanks
On Sun, October 28, 2007 11:05 pm, centos@unixplanet.biz wrote:
Hello
Is there any way to find out which files are in swap space ?
swapon -s
is there any proc option that we can see the current and real time swaped files.
cat /proc/swaps
The two are equivalent.