LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I have some questions about the command line again. (https://www.linuxquestions.org/questions/linux-newbie-8/i-have-some-questions-about-the-command-line-again-290286/)

darren200184 02-14-2005 07:15 PM

I have some questions about the command line again.
 
Some quick questions here:

In what directory does the file that corresponds to the cat command exist? What would I type in the command line to find this out?

Also, what is the difference between the absolute and relative directory path?

Thanks in advance.

Tarrin 02-14-2005 07:30 PM

The cat command should be in your root bin directory (/bin/cat) - you can use the 'whereis' command to find the binaries and man pages for a command.

An absolute path leads with a '/' and designates a directory starting from the root structure (top of the filesystem). It will be the same no matter what. A relative path, however, varies, depending on when and where it is used. It generally looks something like 'bob/stuff' - no backslash to begin it. If you're in the directory 'home' and execute the command 'cd bob/stuff', it will look for the directory 'bob' and then 'stuff' starting in the directory 'home' [the one you're in]. If you execute the command 'cd /bob/stuff', it will look for the directory 'bob' and then 'stuff' starting from the root directory (/).

darren200184 02-14-2005 07:31 PM

Thank you very much.

knl 02-15-2005 08:13 AM

Try out the whereis command to locate command locations.


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