LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 08-21-2011, 11:46 AM   #1
hitmen
Member
 
Registered: Jun 2011
Distribution: Kubuntu 10.04
Posts: 158

Rep: Reputation: Disabled
Shell Script Does Not Run


c@c-laptop:~/Desktop/tor-browser_en-US$ start-tor-browser
start-tor-browser: command not found

c@c-laptop:~/Desktop/tor-browser_en-US$ start-tor-browser.sh
start-tor-browser.sh: command not found

c@c-laptop:~/Desktop/tor-browser_en-US$ ls -la
total 36
drwxr-xr-x 8 c c 4096 2011-08-20 02:43 .
drwxr-xr-x 8 c c 4096 2011-08-21 20:44 ..
drwxr-xr-x 3 c c 4096 2011-08-20 02:43 App
drwxr-xr-x 5 c c 4096 2011-08-20 02:43 Data
drwxr-xr-x 5 c c 4096 2011-08-20 02:43 Docs
drwxr-xr-x 3 c c 4096 2011-08-20 02:43 Lib
drwxr-xr-x 3 c c 4096 2011-08-20 02:43 .mozilla
-rwxr-xr-x 1 c c 2538 2011-08-20 02:43 start-tor-browser
drwxr-xr-x 2 c c 4096 2011-08-20 02:43 tmp

c@c-laptop:~/Desktop/tor-browser_en-US$ start-tor-browser
start-tor-browser: command not found

c@c-laptop:~/Desktop/tor-browser_en-US$ start-tor-browser.sh
start-tor-browser.sh: command not found


I am trying to open start-tor-browser using command prompt but it does not work.
 
Old 08-21-2011, 11:49 AM   #2
Nylex
LQ Addict
 
Registered: Jul 2003
Location: London, UK
Distribution: Slackware
Posts: 7,464

Rep: Reputation: Disabled
When you use the shell, it looks in a list of directories called the PATH, to locate commands you give it. Usually, the current directory is not in the PATH, so you need to explicitly tell the shell where to find the script. This can be done by prefixing the name with "./", since . is shorthand for the path to the current directory.
 
Old 08-21-2011, 11:51 AM   #3
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Code:
./start-tor-browser
Your home directory is not in your path. The above command will work if run from your home directory.
You need to read up on the linux file system.
ciao,
jdk
 
  


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
[SOLVED] run a shelll script from another shell script in another directory raulab Linux - Newbie 12 02-22-2011 06:18 PM
in bash shell how to run shell script during startup rammohan04 Red Hat 2 07-31-2009 03:07 AM
MySQL Updates With Null When Perl Script Run From Shell Script ThisGuyIKnow Programming 6 08-12-2008 10:56 AM
Restrict a Shell Script to run from a shell bharaniks Linux - Security 7 08-26-2007 11:57 PM
Shell script to run pl/sql script. colly Linux - General 1 09-09-2004 07:49 AM


All times are GMT -5. The time now is 05:48 PM.

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