Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-02-2009, 05:49 PM   #1
LQ Newbie
Registered: Mar 2009
Posts: 3

Rep: Reputation: 0
Question Executing files which are not in current directory

I want to execute a file which is not in the current directory. There is an argument to this executable which is a .cfg(configuration file). It is in the same directory as the executable (but not in the current directory).

I did..
current_directory$ ./inside_current_directory/executable argument.cfg

It does not work. It says can not read argument.cfg.

What I am missing here?

Old 03-02-2009, 05:58 PM   #2
TBC Cosmo
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 355

Rep: Reputation: 43
You need to give the relative path of the argument file. The way you have it says "look in current dir"

You also execute the executable file using the relative path. No need for ./path/executable

Should be path/toexecutable/foo path/toexecutable/argumentfile
Old 03-02-2009, 06:20 PM   #3
LQ Newbie
Registered: Mar 2009
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks a lot. That fixed my problem.


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
move all files in current directory into a subdirectory in the current directory jakykong Linux - Newbie 8 07-16-2013 11:46 PM
Find files in current directory, not subdirectories SmurfGGM Linux - Newbie 1 10-09-2008 12:14 PM
doing a ls from a directory (not the current) giving the files without path Byenary Linux - Newbie 5 06-25-2008 11:35 AM
how to find files in current directory only (not recursively) babu198649 Linux - Newbie 2 12-27-2007 01:30 AM
list only files in current directory xscousr Programming 8 09-22-2003 07:35 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:36 PM.

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