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 11-21-2003, 02:39 PM   #1
xailer
Member
 
Registered: Nov 2003
Posts: 77

Rep: Reputation: 15
I can't see the difference between the two commands


hi
Im using the following command to restart automounter:

/etc/rc.d/init.d/autofs restart

But if I first browse to directory in which autofs resides in:

cd /etc/rc.d/init.d

;and then try to issue command:

autofs restart

I get command not found error.

Why is the first command working and second isn't?I can't see any difference between the two of them?

thank you
 
Old 11-21-2003, 02:47 PM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 234Reputation: 234Reputation: 234
Because /etc/rc.d/init.d/ is not in your path to execute commands. Either add that path to your $PATH or you will either have to type the full path to it or cd into the directory and issue a ./ in front of the command.
 
Old 11-21-2003, 02:48 PM   #3
fancypiper
LQ Guru
 
Registered: Feb 2003
Location: Sparta, NC USA
Distribution: Ubuntu 10.04
Posts: 5,141

Rep: Reputation: 58
Try ./autofs restart

That means "the file is in the directory I am working in".
 
Old 11-21-2003, 03:14 PM   #4
xailer
Member
 
Registered: Nov 2003
Posts: 77

Original Poster
Rep: Reputation: 15
great,it works

But why can you run files from same directory and not programs?

in doesn't make sense

thank you
 
  


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
What's The Difference Rick069 Linux - General 3 10-16-2005 07:42 PM
difference between df -k and du -s Prasun1 Linux - General 3 06-22-2005 07:07 PM
what is difference between "reset" and "clean " commands? zameer_india Linux - Newbie 2 01-10-2005 07:23 AM
What is the difference...? ralexand88 Linux - Newbie 4 03-12-2004 05:57 AM
What's the difference...? fxlee Linux - Newbie 1 02-23-2002 06:51 PM


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