http://qs321.pair.com?node_id=305191


in reply to Net::FTP on OSX10.3 corrupting files

Have you compared a file uploaded with fetch to a file uploaded with Net::FTP ?

ls -l diff filea fileb strings filea > a.txt strings fileb > b.txt diff a.txt b.txt | more

It might be easier to compare non binary files as a control, but you can force diff to do binary files

Replies are listed 'Best First'.
Re: Re: Net::FTP on OSX10.3 corrupting files
by manchot (Initiate) on Nov 07, 2003 at 01:20 UTC

    Yes, the files are slightly different sizes, and diff-a spits out a ton of junk (remember, they're mpeg4s, and 40+MB each.. )

    Comparing the strings output, they starts out similar, and with some binary looking characters in them, too..

    43810573 Nov 06 16:25 x.mp4 (Net::FTP)
    43811351 Nov 06 13:45 y.mp4 (Fetch)

    %> head *.txt
    ==> x.txt<==
    ftypmp42 mp42isom kmoov lmvhd çġtrak \tkhd $edts elst çmmdia mdhd
    ==> y.txt <==
    ftypmp42 mp42isom kmoov lmvhd çġtrak \tkhd $edts elst çmmdia mdhd

    had to stop the strings, cuz each file was generating around 24 MEGs of "strings"!!

    Clearly, fetch and Net::FTP are not doing the same thing!

Re: Re: Net::FTP on OSX10.3 corrupting files
by Roger (Parson) on Nov 07, 2003 at 13:34 UTC
    Just to add that there is a gnu program called bdiff that specializes in diffing binary files. And also bvi to edit binary files.