LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-15-2004, 05:14 AM   #1
siwaporn
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
Question ftp an executable file


Hello!
I'm a newbie of this site. My question is about Linux/ Unix in general. Basically, I used gcc / g++ to compile codes from my computer and obtain an executable file. (This executable file is a result of linked multiple *.o files.) Then I need to transfer this executable file to a different computer to run it. But the file seemed to corrupt under ftp. (I ftp it as a binary file.) When I run this executable file on that computer, it complaint "Exec format error. Binary file not executable." Does anybody have any idea what's going on here? Is it possible for me to transfer this executable file somehow without getting into this problem? Thank you for your help/ suggestion.
 
Old 03-15-2004, 05:54 AM   #2
AMMullan
Member
 
Registered: Sep 2003
Location: United Kingdom
Distribution: Ubuntu, Arch
Posts: 438

Rep: Reputation: 30
What are you using to transfer the file? standard ftp or sftp?
 
Old 03-15-2004, 07:15 AM   #3
yuray
Member
 
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Before starting make command
chmod a+x you_file
 
Old 03-15-2004, 04:00 PM   #4
siwaporn
LQ Newbie
 
Registered: Mar 2004
Posts: 2

Original Poster
Rep: Reputation: 0
I used standard ftp and gFTP (graphic ftp). Both of them don't work. But I will try to chmod a+x before doing ftp. Thanks for all suggestions. : )
 
Old 03-15-2004, 07:33 PM   #5
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Use the command:

type binary

At the FTP prompt after connecting to the FTP server.
 
Old 03-16-2004, 12:01 AM   #6
yuray
Member
 
Registered: Apr 2003
Location: Russia, Khotkovo
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Quote:
Originally posted by siwaporn
I used standard ftp and gFTP (graphic ftp). Both of them don't work. But I will try to chmod a+x before doing ftp. Thanks for all suggestions. : )
AFTER ftp.

1. You compile program.
2. You transfer program with ftp on other machine
3. chmod a+x your_program
4. cd your_dir; ./you_program
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Macos X like executable file rcainc Linux - Software 4 08-03-2005 05:01 AM
how do I lauch a file by its executable cjae SUSE / openSUSE 1 07-12-2005 11:51 AM
executable file won't open marie-p Linux - General 6 01-21-2005 06:13 PM
Linux Executable File Help (created from a .c file) MattG1981 Linux - Newbie 7 06-06-2004 04:54 PM
VB executable file decompiler XillusionsX Programming 3 10-29-2002 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration