I was using BC4 to sync files from my mac to a Linux box (RHEL 6.4) when I noticed something odd was happening. BC4 when copying my shell script (*.sh) was changing the size of the file.
When I compared the files in the sync view they reported being identical with the same line endings but differing byte sizes. So I did a hex compare thinking that's a byte for byte comparison and should show me where those extra bytes were. It didn't. They were still identical.
So I tar'd up the bash script on the linux machine and then compared the file in the tar file with the file in the source directory from my mac. This time I see the same byte difference in size. However I can now also see that the file on the Linux machine is reporting PC line endings.
To recreate this issue simply create a bash script on the Mac and folder sync it to a Linux machine. You should see it get larger when it arrives on the Linux machine. An undesired side effect in all this is that the script doesn't execute on the Linux machine due to the line ending changes.
When I compared the files in the sync view they reported being identical with the same line endings but differing byte sizes. So I did a hex compare thinking that's a byte for byte comparison and should show me where those extra bytes were. It didn't. They were still identical.
So I tar'd up the bash script on the linux machine and then compared the file in the tar file with the file in the source directory from my mac. This time I see the same byte difference in size. However I can now also see that the file on the Linux machine is reporting PC line endings.
To recreate this issue simply create a bash script on the Mac and folder sync it to a Linux machine. You should see it get larger when it arrives on the Linux machine. An undesired side effect in all this is that the script doesn't execute on the Linux machine due to the line ending changes.
Comment