1) logout = exit a login shell

A login shell, is your topmost shell, and is started when you log in.

When you terminate a login shell (via the commands `exit’, `logout,’ or the end of file [^D]), you are logged out completely.

A `sub-shell’ is a shell created after login, either by loading a new shell or opening a window with a graphics interface. A sub-shell usually will not accept the command `logout’ to terminate, you must use `exit’ or ^D.
When you terminate a sub-shell, you are returned to the process or shell that created it.


2) finger = user information lookup program

usage : finger [-b] [-f] [-h] [-i] [-l] [-m] [-p] [-q] [-s] [-w] [username]

example : finger -q username

-b Suppress printing the user’s home directory and shell in a long format printout.
-f Suppress printing the header that is normally printed in a non-long format printout.
-h Suppress printing of the .project file in a long format printout.
-i Force “idle” output format, which is similar to short format except that only the login name, terminal, login time, and idle time are printed.
-l Force long output format.
-m Match arguments only on user name (not first or last name).
-p Suppress printing of the .plan file in a long format printout.
-q Force quick output format, which is similar to short format except that only the login name, terminal, and login time are printed.
-s Force short output format.
-w Suppress printing the full name in a short format printout.


3) alias = create a ‘shortcut’ to a command.

The format is alias name=’command’. Example:

alias home=’cd /home/dave/public_html’

just by typing home will put you in /home/dave/public_html directory

To see the list of alias already set type alias


4) ln = make links between files

ln command has two types

a) hard link = to assign a keyword to link to a file deep in directory, so easier to open it. Example: I am always working on this file /home/amrun/projects/bubblegum/secret.txt. To make it easier to access it everyday i create a hard link : ln /home/amrun/projects/bubblegum/secret.txt bbgumformula

Now i can just open bbgumformula it will directly open the file secret.txt

b) symbolic link = to create a link to a directory, must use symlink. Symlinks are also required when linking to a file on a different disk partition or on a network.

ln -s /dev/fd0 A:

ln -s /etc/httpd/conf web

The first example allows you to access the floppy drive as drive A, just like in DOS, and the second creates a directory entry called web that can be used instead of /etc/httpd/conf.


5) touch = changes the date/time stamp of the file filename to the current time. Creates an empty file if the file does not exist.


% touch analysis_data.xls

it changes the timestamp of file analysis_data.xls to the current time.

There are three date/time values associated with every file on an ext2 filesystem:

– the time of last access to the file (atime)
– the time of last modification to the file (mtime)
– the time of last change to the file’s inode (ctime).

Touch will change the first two to the value specified, and the last one always to the current system time.


-a, –time=atime, –time=access, –time=use
Change the access time only.

-c, –no-create
Do not create files that do not exist.

-d, –date time
Use time (which can be in various common formats)
instead of the current time. It can contain month
names, timezones, `am’ and `pm’, etc.

-m, –time=mtime, –time=modify
Change the modification time only.

-r, –file reference-file
Use the times of reference-file instead of the cur-
rent time.

-t MMDDhhmm[[CC]YY][.ss]
Use the argument (months, days, hours, minutes,
optional century and years, optional seconds)
instead of the current time.

For details, some good example: http://www.linfo.org/touch.html