On Sun, 2007-10-14 at 16:30 -0400, centos at 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 at 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. -- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
On Sun, Oct 14, 2007 at 04:30:16PM -0400, centos at 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 :-) -- rgds Stephen
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 Sunday 14 October 2007, centos at 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 at 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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: <http://lists.centos.org/pipermail/centos/attachments/20071015/2487fa0a/attachment-0004.sig>