The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to compare binaries mblank SUN Solaris 2 05-26-2008 04:05 AM
compare two binaries. abu_hassan SUN Solaris 2 04-30-2007 01:44 PM
Binaries/Depot for Subversion 1.4.3 for HP/UX 11.11 spud HP-UX 3 03-29-2007 07:27 AM
Compile freeBSD binaries in Linux shalmoo High Level Programming 0 10-01-2003 12:38 AM
Windows Binaries Maestin UNIX for Dummies Questions & Answers 3 07-03-2002 11:51 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 08-13-2007
Registered User
 

Join Date: Aug 2007
Posts: 2
FTP is corrupting binaries

I'm ftping some binaries from a centos box to an old DEC machine. They're being transferred in bin, but they're being corrupted somehow because when I run file filename on the centos machine, it shows that it's an executable. But after the ftp and running the same command on the DEC, the file type shows data. I've tried transferring it in a .tar and cpio, but I have the same results when they're extracted.

So my question would be is if the DEC machine is having problems reading the file?
Reply With Quote
Forum Sponsor
  #2  
Old 08-13-2007
Registered User
 

Join Date: Feb 2006
Location: Schenectady, NY
Posts: 130
It sounds as if the binaries are for a different architecture which run fine on the source machine buf fail miserably on the target machine. I would suggest FTPing the files back, in binary mode, from the old DEC machine to the centros box and then try to execute them.

If they execute normally, you can then eliminate FTP as the culprit.
Reply With Quote
  #3  
Old 08-13-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by krisl View Post
But after the ftp and running the same command on the DEC, the file type shows data.
How about doing an MD5 sum on the files on each machine? That will tell you if the files are faithful copies.

Are you trying to run a binary from one machine OS/architecture on a different OS/architecuture?

What operating systems are both machines? Do "uname -a" on each.
Reply With Quote
  #4  
Old 08-13-2007
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,616
A valid executable on a centos box is not going to run on an old DEC machine. You need to transfer the source code and recompile on the DEC. Even that could be rough since the old DEC may not have a modern compiler.
Reply With Quote
  #5  
Old 08-14-2007
Registered User
 

Join Date: Aug 2007
Posts: 2
The binaries were compiled on a DEC machine in-house. They were then gtarred and ftpd to a centos box. They then had to be ftpd to the DEC machine (no internet access). When the files are extracted, they're corrupt and not executable. Running a file filename on them shows a filetype of "data." Other non-binary files come out just fine.

The centos box doesn't have ftp running, but I'll see if I can get the service up and running and try ftping from the DEC machine. I will try the checksum.

Thanks for the suggestions. And if you can think of anything else, I would appreciate it.
Reply With Quote
  #6  
Old 08-14-2007
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Washington DC Area
Posts: 8,616
Maybe the original ftp from DEC to centos was in ASCII mode.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Tags
cpio

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0