I have a file that I have tried transferring across the wired LAN via both scp and rsync, and both have yielded the same result. When I run du file
on the file after the transfer, the file is 8 bytes larger on the recipient host.
I have also checked head file | hexdump -C
on both hosts, and they are identical. Same story for tail
...
Any ideas why this might be happening? If it matters, the file is a gzip.
du file
is not a suitable way to measure file size. Even the very first line of the man page says « du - estimate file space usage » (my italics).Instead, use one or more of the following methods (others will also exist):