LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 03-11-2007, 01:58 AM   #1
golpemortal
Member
 
Registered: Sep 2003
Posts: 156

Rep: Reputation: 30
running executive programs from the command link


I have an executive program that I need to run at the command prompt; how do I do it...

should run if I double click it, but is not doing it... I wanna try command line
 
Old 03-11-2007, 03:28 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Do you mean "executable" rather than "executive"?

If so you need to make sure the permissions (and ownership/group) are correct for the user that is attempting to run the command.

e.g. If a file is to be executed by only root then it should have root as the owner and have the execute bit set for owner.
chown root <file>
chmod 700 <file> (if a script)
-OR-
chmod 500 <file> (if a binary)

You can see current permissions, ownership and group with the ls command:
ls -l <file>

You can get more details with the man command for each of the above commands:

man ls
man chmod
man chown
 
Old 03-11-2007, 03:35 AM   #3
golpemortal
Member
 
Registered: Sep 2003
Posts: 156

Original Poster
Rep: Reputation: 30
is so late at night here... that I misspelled that word...

tried it on root and didn't run...

is a patch file and I allowed it to be executed under my user name and tried it under
root and it didn't run... But I double click the file... some files under the right permission will run like that...this one didn't and that's why I need to know how to run it on the terminal....
 
Old 03-11-2007, 03:36 AM   #4
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
make sure you are in the right directory and type./program
 
Old 03-11-2007, 03:38 AM   #5
golpemortal
Member
 
Registered: Sep 2003
Posts: 156

Original Poster
Rep: Reputation: 30
AceofSpades19 you mean ./patch?

patch is the file I need to install
 
Old 03-11-2007, 03:39 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Expanding on that - the "./" says "in this directory". This way you are sure the command can be found if the directory where it is isn't in your PATH variable.

You can see what's in that variable by typing:
echo $PATH
each directory will be separated by a colon.

If the file is named "patch" and you are in the directory where the file "patch" is then "./patch" should work so long as it is executable.

Last edited by MensaWater; 03-11-2007 at 03:42 AM.
 
Old 03-11-2007, 03:44 AM   #7
golpemortal
Member
 
Registered: Sep 2003
Posts: 156

Original Poster
Rep: Reputation: 30
AceofSpades19 and jlightner thanks for the help...

I as you said... from the terminal I cd to the installed dir and did ./patch

the script ran just as expected.....

thank guys.... still I think I am new to Linux!!!!!!!
 
Old 03-11-2007, 02:14 PM   #8
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
No problem
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
specify which programs to pre-link true_atlantis Fedora 3 06-20-2006 02:33 PM
How do you link programs to files in KDE 3.2? jacatone Linux - Newbie 1 08-05-2005 03:25 PM
Running Programs from command line sumguy231 Linux - Software 4 12-17-2004 03:10 PM
running a terminal command from a link nebula_nirvana Linux - Newbie 1 06-07-2004 09:08 AM
Running programs from Command Line SirLostalot Linux - Newbie 1 11-11-2002 09:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 03:58 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