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. |
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 (/). |
Thank you very much.
|
Try out the whereis command to locate command locations.
|
All times are GMT -5. The time now is 08:36 PM. |