LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-22-2006, 03:21 AM   #1
shipon_97
Member
 
Registered: Oct 2005
Location: Bangladesh
Posts: 484

Rep: Reputation: 30
Cool How to run a binary file


Hi ,

I am using Redhat Enterprise Linux 4 , I want to install/run a binary file . i.e., i want to install a file which is a binary distribution . Plz help me how i can do it ?
or give me the perfect command...

Thx.........
 
Old 05-22-2006, 03:40 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
just run it: "/path/to/binary_file" might want to run it via a shell "sh /path/to/binary_file"
 
Old 05-22-2006, 04:43 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
And make sure it's marked as executable (x permission).
 
Old 05-22-2006, 05:01 AM   #4
verdeboy2k
Member
 
Registered: Jan 2004
Location: /dev/random
Distribution: Gentoo amd64, CrunchBang amd64
Posts: 350

Rep: Reputation: 32
easy way to mark it as executable (if a bit indiscriminate as to user privileges)
Code:
chmod a+x /path/to/file
 
Old 05-22-2006, 12:02 PM   #5
snay
LQ Newbie
 
Registered: Apr 2005
Distribution: Fedora Core 5
Posts: 17

Rep: Reputation: 0
Make sure it has executable permissions. As root type ls -l
This will give an output something like this:
-rw-rw-r-- 1 anthony anthony 305057 May 18 15:48 filename
Its the first part you want to look at. The dashes and letters. the r stands for read, the w stand for write, and the x that isnt there means you can execute, or run it.
Because the file isnt executable, type as someone sugested earlier:
chmod a+x filename
this will alter the permissions of the file, to be executable, for all.Now ls-l should display something like this:
-rwxrwxr-x 1 anthony anthony 305057 May 18 15:48 filename
Notice the extra x's in the first part, meaning it is executable. Now to run it, type ./filename
This will run a file in the current directory. That is the directory you are currently in. Hope this helps. If not let us know.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
run amd64 binary on 32bit kernel ? juice99 Debian 3 01-19-2006 07:37 AM
can we run the binary file directly kamesh156 Linux - General 1 10-17-2005 08:57 AM
can't run binary files abs Slackware 12 01-21-2005 02:56 AM
Why won't this binary run? islandkid Linux - General 15 09-01-2002 03:51 PM
How to run binary at booting time hai_rajneesh Linux - Software 2 06-23-2002 04:31 AM


All times are GMT -5. The time now is 02:25 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration