LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 02-14-2005, 07:15 PM   #1
darren200184
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Rep: Reputation: 0
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.
 
Old 02-14-2005, 07:30 PM   #2
Tarrin
LQ Newbie
 
Registered: Feb 2005
Location: NY
Distribution: Debian
Posts: 7

Rep: Reputation: 0
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 (/).

Last edited by Tarrin; 02-14-2005 at 07:34 PM.
 
Old 02-14-2005, 07:31 PM   #3
darren200184
LQ Newbie
 
Registered: Feb 2005
Posts: 4

Original Poster
Rep: Reputation: 0
Thank you very much.
 
Old 02-15-2005, 08:13 AM   #4
knl
LQ Newbie
 
Registered: Nov 2003
Posts: 5

Rep: Reputation: 0
Try out the whereis command to locate command locations.
 
  


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
Anyone know the answers to these command-line questions? PDASquare Linux - General 11 08-28-2005 08:37 AM
Anyone know the answers to these command-line questions? PDASquare Linux - Software 2 08-27-2005 04:52 PM
Some questions in the command line. darren200184 Linux - Newbie 2 02-13-2005 08:40 PM
newbie questions about the command line sether *BSD 12 09-04-2004 01:40 PM
Command Line Questions Chryzmo Linux - Newbie 5 02-04-2004 08:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:03 AM.

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
Open Source Consulting | Domain Registration