Linux Quick Command Reference
 Back To Book Introduction 
This content is not in any particular order. This is just a short synopsis of 
what you would see, if you skimmed through the book.
Common UNIX filename Extensions

Extension     	Description
.a              Archived file or assembler code.
.au          	Audio  file 
.c         	C language source file
.csh            C shell script
.enc        	Encrypted file
.F              FORTRAN source code before 
	        processing
.gif            Graphics Interchange format file
.gl             Animation file
.gz             File compressed with gzip
.h              C program header file
.jpg or jpeg    Joint Photographic Experts Group 
		format




Alphabetical Unix Command List: 

addbib - create or extend a bibliographic database 
apropos - locate commands by keyword lookup 
ar - create library archives, and add or extract files 
at - execute a command or script at a specified time 
awk - pattern scanning and processing language 
banner - display a string in large letters 
basename - display portions of path names and filenames 
batch - runs jobs when the system load level permits 
biff - give notice of incoming mail messages 
cal - display a calendar 
calendar - a simple reminder service 
cancel - cancel requests to a printer 
cat - concatenate and display 
cb - a simple C program beautifier 
cc - C compiler 
cd - change working directory 
checknr - check nroff and troff input files; report possible 
errors 
checkeq - checks documents formatted with memoranda macros 
chgrp - change the group ownership of a file 
chmod - change the permissions mode of a file 
clear - clear the terminal screen 
cmp - perform a byte-by-byte comparison of two files 
colcrt - filter nroff output for a terminal without overstrike 
capability 
comm - selects or rejects lines common to two sorted 
files 
compress - compress files (see uncompress also) 
cp - copy files 
cpio - copy file archives in and out 
cpp - the C language preprocessor 
csh - a shell with a C-like syntax and advanced            
interactive features 
ctags - create a tags file for use with ex and vi 
cut - Writes selected bytes, characters, or fields from 
each line of a file.


Linux Glossary


CORBA (Common Object Request Broker Architecture)
A specification developed by the Object Management 
Group detailing how object messaging are handled 
across different platforms.

core dump Main memory content that is produced when 
a program does not operate successfully. You can use 
this information to find out where the failure 
occurred.

cron An utility used to schedule processes. System file 
backups and machine maintenance routines are often 
scheduled by cron.

crontab A system utility that enters cron jobs 
information into a formatted file. The crontab 
file is checked periodically to see if a scheduled 
process should start.

current directory The directory that a UNIX user is 
in now ,also called the present working directory 
symbolized by the (dot) . notation and displayed by 
using the pwd command.

cursor An indicator used to show the current position 
on screen.  Normally this is a blinking vertical or 
horizontal symbol.

daemon Pronounced "day-mon," or "de - mon." 
daemon is an automated process (sometimes spelled 
or pronounced as "demon") that performs a standard 
routine or service.  For example,  an e-mail program that 
sends an automated message whenever it receives an 
e-mail message.


Common UNIX Daemon

Daemon	  Descriptions
ftpd	  File transfer protocol daemon
inetd	  Internet daemon
lockd	  Network lock daemon
lpd	  Line Printer daemon
named	  Internet domain name server daemon
nfsd	  NFS daemon
pppd	  Point-to-point protocol daemon
uucpd	  UUCP daemon

DARPA (Defense Advanced Research Projects Agency)  
A military agency that developed the ARPANET.You can
think of this as the original Internet.

data gram  A packet that contains data and addressing 
information. Data grams are self-contained and carry 
a complete address.

debugger A program that shows the logic path and 
values of registers and variables during execution 
of a process to locate where a failure occurred. Unix
has a debugger named sdb that is used to locate 
instructions that were executed during a core dump.

default user environment The environment that is set 
up for new users who are added to a system by the 
useradd command,  if installed.

default value The value used by a program for an 
argument or variable when the user does not specify 
a value.

fdev The directory that contains the filenames used 
to gain access hardware drivers for, printers, terminals 
and other devices.

device Peripheral equipment used in input or output 
(I/O) of data.  Unix separates processes from the I/O 
devices to allow flexibility.  Device files and names 
are stored in the /dev directory.

device driver Allows data to transmit among 
computers and their peripheral devices.

device independence The ability of a program to accept 
input and output with any peripheral hardware.

Idevinull A special destination file for output or 
input,  used when output is not desired, or as an input 
when nothing is to be read in. A type of "throw away" 
trash bin file.

directory A directory is a holding area for files or 
other directories.  You can access files by
supplying all the directory names from the root 
down to the directory holding the file. This is called 
the full path name.

distributed database system A database system that 
appears as a single database to end users,  even 
though the data physically resides on more than one 
machine.

distributed file system A file system in which user 
programs and data files are physically distributed 
over several computers on a network,  but can be used 
by any user who has access to any of the files as if 
they were local files.



D.1.1 Games

This section lists packages that contain a variety of games. 

cxhextris -- (Version 1.0, 39K)

CXHextris is a color version of the popular xhextris game, 
which is a Tetris-like game that uses hexagon shapes instead of
square shapes. CXHextris runs within the X Window System. 

Install cxhextris if you enjoy playing Tetris or Tetris-like games 
and you'd like to play one on your system. You'll need to have
X installed in order to play CXHextris. 

fortune-mod -- (Version 1.0, 2,342K)

Fortune-mod contains the ever-popular fortune program. Want a 
little bit of random wisdom revealed to you when you log in?
Fortune's your program. Fun-loving system administrators can add 
fortune to users' .login files, so that the users get their dose
of wisdom each time they log in. 

Install fortune if you want a program which will bestow these 
random bits o' wit. 


gnome-games -- (Version 1.0.2, 3,342K)

[W] 

GNOME is the GNU Network Object Model Environment. That's a fancy 
name, but really GNOME is a nice GUI desktop environment. Its 
powerful, friendly and easy-to-configure interface makes using 
your computer easy. 

This package installs some GNOME games on your system, such as 
gnothello, solitaire, tetris and others. 

gnuchess -- (Version 4.0.pl79, 1,428K)

The gnuchess package contains the GNU chess program. By default, 
GNUchess uses a curses text-based interface.  Alternatively, GNUchess 
can be used in conjunction with the xboard user interface and the 
X Window System for a graphical chessboard. 

You should install the gnuchess package if you would like to play 
chess on your computer. You'll also need to install the curses
package. If you'd like to use a graphical interface with GNUchess, 
you'll also need to install the xboard package and the X Window 
System. 

kdegames -- (Version 1.1.1pre2, 4,962K)

Games for the K Desktop Environment. Included with this package are: 
kabalone, kasteroids, kblackbox,kmahjongg, kmines, konquest, kpat, 
kpoker, kreversi, ksame, kshisen, ksokoban, ksmiletris, ksnake, 
ksirtet. 

D.1.2 Graphics

This section lists packages that provide graphics that are fun to 
look at. 

xdaliclock -- (Version 2.14, 80K)

The xdaliclock program displays a digital clock, with digits that merge 
into the new digits as the time changes. Xdaliclock can display the time 
in 12 or 24 hour modes and can will display the date if you hold your
mouse button down over it. Xdaliclock has two large fonts built in, but 
is capable of animating other fonts. 

xloadimage -- (Version 4.1, 255K)

The xloadimage utility displays images in an X Window System window, 
loads images into the root window, or writes images into a file. 
Xloadimage supports many images types (GIF, TIFF, JPEG, XPM, XBM, 
etc.). 

Install the xloadimage package if you need a utility for displaying 
images or loading images into the root window. 

xlockmore -- (Version 4.13, 759K)

The xlockmore utility is an enhanced version of the standard xlock 
program, which allows you to lock an X session so that other users 
can't access it. Xlockmore runs a provided screensaver until you 
type in your password. 

Install the xlockmore package if you need a locking program to secure 
X sessions. 

postgresql -- (Version 6.4.2, 6,918K)

[S] 

Postgresql includes the programs needed to create and run a PostgreSQL 
server, which will in turn allow you to create and maintain PostgreSQL 
databases. PostgreSQL is an advanced Object-Relational database 
management system (DBMS) that supports almost all SQL constructs 
(including transactions, subselects and user-defined types and 
functions). 

You should install postgresql if you want to create and maintain your 
own PostgreSQL databases and/or your own

PostgreSQL server. If you are installing postgresql, you should also 
install postgresql-data, which will help you get started with
PostgreSQL. 

postgresql-clients -- (Version 6.4.2, 938K)

[S] 

Postgresql-clients includes the client programs and client libraries 
that you'll need to access a PostgreSQL database management system 
server. This package contains the client libraries for C, C++ and 
PERL, as well as command-line utilities for managing PostgreSQL 
databases on a remote server. If you just want to connect to an 
existing remote PostgreSQL server, this package is all you need. 

You should install postgresql-clients if you're installing postgresql. 
You should also install postgresql-clients if you're not installing 
postgresql, but you want to access PostgreSQL databases on a remote 
PostgreSQL server. 

wget -- (Version 1.5.3, 335K)

GNU Wget is a file retrieval utility which can use either the HTTP or 
FTP protocols. Wget features include the ability to work in the 
background while you're logged out, recursive retrieval of directories, 
file name wildcard matching, remote file timestamp storage and 
comparison, use of Rest with FTP servers and Range with HTTP 
servers to retrieve files over slow or unstable connections, 
support for Proxy servers, and configurability. 

Install wget if you need to retrieve large numbers of files with 
HTTP or FTP, or if you need a utility for mirroring web sites or 
FTP directories. 

xchat -- (Version 0.9.4, 196K)

[W] 

X-Chat is yet another IRC client for the X Window System, using the 
Gtk+ toolkit. It is pretty easy to use compared to the other Gtk+ IRC 
clients and the interface is quite nicely designed. 



alias

Alias lets you define new commands,  by inventing a 
new name for script programs or commands.
Here are three reasons for using an alias:
Reduces the amount of typing that you
do. If you are already using a command with 
the same options, you can create a one-character 
alias and use that instead.
Automate complex difficult to remember 
command procedures.  
To avoid lengthy path searches.  Commands
start quicker when aliased to the complete 
path name.

The syntax you use for this command depends on 
which shell you use.

The Korn shell syntax is:

   alais [options] [name] [= command]]
which assigns a shorthand name to command.  If you 
leave out the [= command ]],you can print the alias 
for name.  If you leave out name you can print all 
the aliases. There are two options for alias in the 
Korn shell.  If you use the less command with the -alt 
options in the Korn shell you can alias this to a 
single letter by typing:

                alias l = ls -alt

Now,just type l if you want to see a long 
directory listing showing all files sorted by the 
time they were last modified.

Options           Descriptions
-t                Makes the Korn shell remember the 
                  full path name for the aliased 
                  command,which allows it to be 
                  found quickly.You can then issue -t 
                  from any directory.Tracked aliases 
                  are the same as hashed commands in
                  the Bourne shell.


Options		Descriptions
-x                Exports the alais so that you can 
                  use it in shell scripts.



alias

C Shell Syntax

The syntax for alias in the C shell is:

              alias  [name] [command]

where name is the sorthand name or alias you want 
to use with command. Just like the Korn shell, if 
you leave out [command], alias prints the alias for
name and if you leave out name, alias prints all the 
current aliases. In the C shell, you can define an 
alias on the command line, but aliases are 
stored in .cshrc so that they are available as 
soon as you log in. To bypass the alias ,use the 
original command name, by typing  \name.

at

The at command takes a list of commands and runs 
them at the time you specify; it is not necessary 
for you to login to the system at the time the 
command is scheduled to run. at allows you to run 
jobs unattended when the system load is low. This 
procedure is usually started after normal working 
hours.

The Syntax for at are:

     at options 1 time [date] [+increment] commands
     at options 2 [ jobs ]

You can use two sets of options with at: options 1 
controls setting the time and date. options2 lets 
you make changes to scheduled jobs.
In options1,you type the information needed by at, 
followed by the command you want to run and then 
end the sequence by typing Ctrl-D on the 
following line.

You can enter the commands from the 
keyboard, pipe them in from another program or use 
input redirection to use an existing file of commands. 
at returns a job ID when it is started. You use 
this ID number with the second syntax showed above.
Many systems restrict the use of at. Only  
users specified in the file /usr/lib/cron/at. allow 
can schedule jobs; if this file doesn't exist, the file 
/usr/lib/cron/at.deny holds a list of users who cannot 
use at. If either file does not exist, only the super 
user can use at.
                        
When UNIX executes commands using at, it uses e-mail 
to send you output from this process; you can redirect 
this mail if you want to.

Options and Arguments

In the first line of syntax, time is the time of day 
when you want at to run your job. You can specify 
time in one of several different ways:

A one or two-digit number specifying the hour.
A four-digit number specifying the hour and 
minute.
Two numbers separated by a colon to specify 
hours and minutes.
noon, midnight or now.

Be sure to note whether the time is am, pm or Zulu 
(for Greenwich mean time) to specify the precise time.
You can specify the date you want to use as:

A three-letter month name followed by the day 
 number, an optional comma and an optional year 
 number.
A day of the week, abbreviated to the first 
 three letters.
today or tomorrow.

       
If you omit date, at defaults to today if the hour 
specified in time is later than the current time; if not,
at runs the job at the same time tomorrow.

The final argument,increment,is a positive number 
followed by minutes,hours,days,weeks,months,or years
or their singular form.at adds this increment to the 
time and date specified. In place of increment,you 
can use the word next to specify next week or next 
year.

In the second line of syntax showed above, jobs is a 
list of one or more at job numbers.

You can use the options shown to report or remove 
jobs.SCO adds one more option,q letter,which places 
a job in the queue specified by letter. Three letters 
have a special significance:
 
a (the default) represents the at queue, b the batch 
queue and c, the cron queue.
                              
Options to Use with at:

Option            Description

                               OPTIONS1
-f  filename     Executes the commands contained in 
                 filename.
-m               Sends mail, if any to the user when 
		 the job is complete. 

                               OPTIONS2
-l [jobs]        Reports all jobs, or if jobs is 
                 specified, reports on them.
-r [jobs]        Removes jobs. You must be the 
		 owner of the job or the superuser.

For instance:

To run the spell program on a file called bigfile at 
four a.m. tomorrow and send any output to a file called 
wordout,use:
       
at   04  tomorrowspell bigfile > wordout(CtrlD)  
job 424765800.a  at Tues Oct 30  04:00:00  2000

The last line above contains the job number and the 
time at will run the job.

See also    Batch

                              
du

du tells you the amount of disk space used by a 
particular directory and it's sub directories; it
lists the diskspace in 512 byte blocks. Incomplete 
blocks are rounded up.

The syntax for du is:

   du  [options]  [directories]

If directories are not found, the du command will 
show you the disk space of the current directory 
and all of its sub directories and files.


Options      Descriptions
-a           Shows the totals for all files and 
             sub directories.
-f           Shows totals for files and directories 
             in the current file system only.
-k           Gives totals in kilobytes.
-L           All symbolic links are followed.
-P           Symbolic links are not followed.
-r           Displays a message cannot open.
-s           Prints to screen a sum total for each 
             filename and directory name.
-u           Ignores files with more than one link.
-x           Prints to screen totals for file and 
             directories in the current file system 
             only.

Examples:

To check out the free space in your home directory
for instance, type:

   du   / home / patrick

You should see:

1100       / home / patrick / games
23545     / home / patrick / assembly
324746   / home / patrick / xfiles 
                              

echo

echo writes arguments to the standard output, which 
is usually a terminal. echo is also a command in the 
C and Bourne shell.

The syntax for echo is:

   echo  [-n]  [string]

echo is useful in shell scripts by prompting 
you for input or give the status of a process.


echo
Options and Arguments

The -n option turns the newline off. Put your message 
inside string and surround your message in quotes.

echo  sequences

Sequence    Descriptions
\b          Backspace
\c          Suppress final newline
            (same as - n option)
\f          Formfeed 
\n          Newline
\r          Carriage return
\t          Tab
\v          Vertical tab
\\          Backslash
\0n         Octal number, specified by n

Examples

This shell script prints-to-screen a message:

echo  "  X   Files  are  running  on  node 1  !  "

If you run the shell script you should see:

      X   Files  are  running  on  node  1  !



KnowledgeWorks, Inc
364  Green  Street
P.O. Box  2701
Gainesville, GA  30503

Copyright©2000 Linux Quick Command Reference  $24.99 + $3.50 (Shipping)
ISBN:  0-9703083-2-9

 

HOME

1.1 Introduction   1.2.10 Referring To Home Directories   1.3.4  Copying Files

1.6 Exploring The File System   1.8   Wildcards   1.9.3 Pipes   1.10.3 Permissions Dependencies

1.12.4  Stopping And Restarting Jobs   1.13.3 Inserting Text   1.13.9 Including Other Files

1.14.3 Shell Initialization Scripts   System Administration   2.3.1 The /etc/imitate file

2.4 Managing File Systems   2.6 Managing Users  2.6.5 Groups   2.7.2 gzip and compress

2.8.3 Making Backups To Tape Devices   2.9.1 Upgrading The Kernel   

2.9.3 Installing A Device Driver Module

BOOK: LINUX QUICK COMMAND REFERENCE

http://personal.atl.bellsouth.net/~psadler

© copyright KnowledgeWorks, Inc. (2001)