1820477 Members
3093 Online
109624 Solutions
New Discussion юеВ

ftp and endianism

 
Mme Jonnaert
Contributor

ftp and endianism

hi
we have to tranfer file between an hp/ux 11i itanium machine and a tru64 alpha server using ftp
Will we have problem with big to little endian representation?
thanks for your answers

tmj
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: ftp and endianism

Using binary mode should eliminate the any possible problems.


Pete

Pete
A. Clay Stephenson
Acclaimed Contributor

Re: ftp and endianism

While binary transfer will preserve the exact byte order, in this case this is probably not a good thing. Tru64 is Little-Endian and HP-UX (either on PA-RISC or Itanium) is Big-Endian -- although the Itanium can run in either. You are really going to have to adopt a data abstraction layer such as XDR (or simply convert everything to text) if this is more than a one-shot deal.
If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: ftp and endianism

Thanks (again), Clay!


Pete

Pete
Mark Greene_1
Honored Contributor

Re: ftp and endianism

You can try to use the swab option of dd to do the byte-swapping prior to ftp'ing:

dd if=file_name of=temp_file_name conv=swab


and then ftp the temp_file_name and see what you get.

mark
the future will be a lot like now, only later
rick jones
Honored Contributor

Re: ftp and endianism

Whether you will have problems probably depends on what is in the file.
there is no rest for the wicked yet the virtuous have no pillows