You are not logged in.

#1 2009-07-17 21:52:21

slenkar
Member
Registered: 2009-07-11
Posts: 56

how do you execute a file from terminal?

Hi I have an executable which I can execute from XFCE but I dont know what command to use from the terminal to execute it (to get debug information)

Offline

#2 2009-07-17 22:04:34

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,092

Re: how do you execute a file from terminal?

common sense and <tab> usually works for me.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#3 2009-07-17 22:08:22

slenkar
Member
Registered: 2009-07-11
Posts: 56

Re: how do you execute a file from terminal?

when I navigate to the correct directory and type in the name of the application it just says 'command not found'

Offline

#4 2009-07-17 22:40:24

miau
Member
Registered: 2009-05-06
Posts: 202

Re: how do you execute a file from terminal?

Have you tried

chmod +x "filename"

, if it is not executble? Or running it with ./"filename" ?

Last edited by miau (2009-07-17 22:40:58)

Offline

#5 2009-07-17 23:08:21

slenkar
Member
Registered: 2009-07-11
Posts: 56

Re: how do you execute a file from terminal?

thanks,
I noticed that you have to be in the files parent directory instead of the same directory

Offline

#6 2009-07-17 23:14:25

nogoma
Member
From: Cranston, RI
Registered: 2006-03-01
Posts: 217

Re: how do you execute a file from terminal?

It's probably a path issue, then; try "./cmd_name" when in the same directory instead of just "cmd_name".


-nogoma
---
Code Happy, Code Ruby!
http://www.last.fm/user/nogoma/

Offline

#7 2009-07-17 23:48:42

majiq
Member
Registered: 2009-03-06
Posts: 259

Re: how do you execute a file from terminal?

Also, be wary of hidden white space. Maybe there's a space at the end of the command, if you still can't get to it.

Offline

#8 2009-07-18 06:44:47

.:B:.
Forum Fellow
Registered: 2006-11-26
Posts: 5,819
Website

Re: how do you execute a file from terminal?

miau wrote:

Have you tried

chmod +x "filename"

, if it is not executble? Or running it with ./"filename" ?

If he can execute it from within Xfce, I doubt it still needs to be made executable.

slenkar wrote:

thanks,
I noticed that you have to be in the files parent directory instead of the same directory

No you don't wink.

Not being able to run executable files in the same directory as you are in is a security measure.

You can always do ./$executable as said before, or, if it's a script, call the interpreter to execute it:

sh $script.sh
python $script.py
perl $script.pl

and so on.


Got Leenucks? :: Arch: Power in simplicity :: Get Counted! Registered Linux User #392717 :: Blog thingy

Offline

#9 2009-07-18 16:54:30

miau
Member
Registered: 2009-05-06
Posts: 202

Re: how do you execute a file from terminal?

B wrote:
miau wrote:

Have you tried

chmod +x "filename"

, if it is not executble? Or running it with ./"filename" ?

If he can execute it from within Xfce, I doubt it still needs to be made executable.

Shame on me...overread it
wink

Offline

Board footer

Powered by FluxBB