Hints for Navigating in LinuxThis is a featured page

The purpose of the page is to give the Linux 'newbie' suggestions on how to 'get around' in Linux.

Absolute and relative paths
In Linux path names may be relative or absolute, and file names may contain any character other than slash. The file names . and .. are special and refer to the current directory and the parent of the current directory respectively. Multiple adjacent slash characters are interpreted as a single separator. The following examples illustrate various forms of path names:

Command Description
/ Absolute path to the root directory
/etc/passwd Absolute path to the file named passwd in the directory etc in the root directory
. Relative path to the current directory
foo Relative path to the file foo in the current directory
foo/bar Relative path to the file bar in the directory foo in the current directory
../foo Relative path to the file foo in the directory above the current directory


Meaning of . and .. in Linux
The file names:
. refers to the current directory, and
.. refers to the parent of the current directory

What happens with the commands cd ..? cd .?

Difference between / , ~, /root , and /home/smithjane?
/ is the root directory
/home/smithjane is the home directory of the user 'smithjane'
~ is an abbreviation for the user's home directory
/root is the home directory of the root user




Rick_Mathieu
Rick_Mathieu
Latest page update: made by Rick_Mathieu , Jan 24 2008, 9:42 PM EST (about this update About This Update Rick_Mathieu Edited by Rick_Mathieu

33 words added

view changes

- complete history)
Keyword tags: None
More Info: links to this page
Started By Thread Subject Replies Last Post
mhogan Useful Commands / Scripts / Programs 0 Jan 17 2008, 5:16 PM EST by mhogan
Thread started: Jan 17 2008, 5:16 PM EST  Watch
Using the ls -l always seems like too many letters to type just to get a quick listing. Here are two nice scripts to put in /usr/local/bin:
Name: l
Contents: ls -a -l "$@"
Purpose: Allows you to do a listing by just tying "l". The $@ in the command passes the command line to the ls. You can then do something like "l *php" to get a listing of all files that end in php.

Name: lm
Content: ls -a -l "$@" | less -e
Purpose: Takes the output of the ls -l listings and pipes it to less.


Name: ncftp
Purpose: A very nice replacement for ftp. Available from http://www.ncftp.org

Name: Crontab addition
Content: Add the following to your root crontab: 1 * * * * /usr/bin/rdate -s time-a.nist.gov > /dev/null 2> /dev/null
Purpose: This will check and set the server time every hour. To update the root crontab, as root: crontab -e


Name: DenyHosts
Purpose: This script runs as a daemon and monitors your system for people trying to hack in. If it finds a given IP that is trying to guess the ssh password, it will block that IP from the server. Be careful, if you mistype your password too many times, you could be locked out. Get it from: http://denyhosts.sourceforge.net/

Name: /etc/rc.d/rc.local
Purpose: This is where you put any jobs or daemons that you want to start on boot.
Do you find this valuable?    
Keyword tags: None
Showing 1 of 1 threads for this page