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 08:05 AM
compare two binaries. abu_hassan SUN Solaris 2 04-30-2007 05:44 PM
Binaries/Depot for Subversion 1.4.3 for HP/UX 11.11 spud HP-UX 3 03-29-2007 11:27 AM
Compile freeBSD binaries in Linux shalmoo High Level Programming 0 10-01-2003 04:38 AM
Windows Binaries Maestin UNIX for Dummies Questions & Answers 3 07-04-2002 03:51 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-13-2007
krisl krisl is offline
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?
  #2 (permalink)  
Old 08-13-2007
hegemaro hegemaro is offline
Registered User
  
 

Join Date: Feb 2006
Location: Schenectady, NY
Posts: 134
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.
  #3 (permalink)  
Old 08-13-2007
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,126
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.
  #4 (permalink)  
Old 08-14-2007
krisl krisl is offline
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.
  #5 (permalink)  
Old 08-14-2007
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,126
Maybe the original ftp from DEC to centos was in ASCII mode.
  #6 (permalink)  
Old 08-13-2007
porter porter is offline Forum Advisor  
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.
Closed Thread

Bookmarks

Tags
cpio

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:12 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0