LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


Closed Thread
  Search this Thread
Old 01-24-2010, 05:01 AM   #1
mostafaashish
LQ Newbie
 
Registered: Aug 2009
Posts: 6

Rep: Reputation: 0
Exclamation Make a file executable and then run


Dear Friend

I have created a file named as pm under the path /home/ppp/ i.e. /home/ppp/pm

To make it executable, I've used command: chmod a+x /home/ppp/pm while residing in root directory.

But while trying to run from root by typing ./pm or within the directory /home/ppp, it was displaying that directory not found.

Please help by providing the step by step procedure, so that I would be able to run my file from root or from the directory.



Regards
mostafaashish
 
Old 01-24-2010, 05:07 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
What kind of file is it?
is it a script or..What happens if you use
Code:
/home/ppp/pm
You can put the file in your path (eq /usr/local/bin)

Last edited by repo; 01-24-2010 at 05:10 AM.
 
Old 01-24-2010, 05:11 AM   #3
cola
Senior Member
 
Registered: Sep 2007
Posts: 1,035

Rep: Reputation: 65
Quote:
Originally Posted by mostafaashish View Post
Dear Friend

I have created a file named as pm under the path /home/ppp/ i.e. /home/ppp/pm

To make it executable, I've used command: chmod a+x /home/ppp/pm while residing in root directory.

But while trying to run from root by typing ./pm or within the directory /home/ppp, it was displaying that directory not found.

Please help by providing the step by step procedure, so that I would be able to run my file from root or from the directory.



Regards
mostafaashish
Post:
Code:
ls -lR /home/ppp
 
Old 01-24-2010, 05:33 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,344

Rep: Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746Reputation: 2746
Also

file pm
 
Old 02-19-2014, 12:50 AM   #5
why_so_serious
LQ Newbie
 
Registered: Oct 2013
Posts: 26

Rep: Reputation: Disabled
Is it program? what kind of file?
 
Old 02-19-2014, 02:56 PM   #6
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,921

Rep: Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618Reputation: 3618
Did you add in the shebang?
 
Old 02-19-2014, 09:28 PM   #7
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,621

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
until the OP posts back that it is a shell script or a c program or a python script or a java program
or what ever it is

there is nothing to do .....

and it has been 3 weeks
so i would guess that the OP is long gone

Last edited by John VV; 02-19-2014 at 09:31 PM.
 
Old 02-20-2014, 05:34 AM   #8
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by why_so_serious View Post
Is it program? what kind of file?
Please, don't resurrect old threads, especially for asking a question instead of providing further and useful feedback to the OP. This one is 4 years old. You are free to open a new thread about this topic, if you wish. Let's this thread rest in peace.
 
  


Closed Thread


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
how to make any file executable kratosal Linux - Newbie 8 04-08-2008 03:50 AM
Make newly created file executable Black Chaos Linux - General 3 08-03-2006 10:53 AM
How to make a bin file executable and install the prgram shariqali Linux - Software 6 03-29-2006 01:11 PM
can't run the executable file after compiling with g++ compiler moondog1129 Linux - Laptop and Netbook 2 02-06-2006 09:24 PM
Run executable file compiled by kylix and mysql in Fedora Core 4 aa_husni Fedora 0 09-15-2005 12:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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