-->
Previous Table of Contents Next


Chapter 5
Linux Commands, Organized by Group

This section covers the major Linux commands, sorted by group and function. The eight categories are:

  General-Purpose Commands
  File-Management Commands
  Text-Processing Commands
  Internet Commands
  Programming Commands
  Networking Commands
  System-Administration Commands
  Mtools

The format of each of these commands is the same. The name of the command is given, following by an example command line, an explanation of the command, the command-line options available, examples, and related commands. Variables are listed in italics. Also, we note when a command is a GNU command or an X Window System command.

General-Purpose Commands

These commands are used for your everyday computing chores.

appres......Lists X Resources

appres class toolkitoptions

PURPOSE

The appres command lists the resources specified by an application. You can specify a general application, or you can specify a particular widget.

The output can be quite voluminous, so you may want to pipe the output to another file.

EXAMPLE


$ appres XTerm

*mainMenu*interrupt*Label:       Send INT Signal

*mailMenu*logging*Label:         Log to File

*mainMenu*quit*Label:   Quit

...

RELATED COMMANDS

listres
xrdb

apropos......Search Whatis Database

apropos keyword

PURPOSE

The apropos command searches the whatis database for information concerning a specified keyword and returns the information in the default EDITOR. The whatis database contains short text summaries of commands.

EXAMPLE


$ apropos xterm

resize (1x)         - set TERMCAP and terminal settings to current

   xterm window size

xterm (1x)          - terminal emulator for X

RELATED COMMANDS

man
whatis
xman

arch......Return Machine Architecture

arch

PURPOSE

Lists the machine architecture of the PC running Linux. This can be i386, i486, or i586 (for Pentium-based PCs).

EXAMPLE


$ arch

i586

RELATED COMMANDS

uname

atobm......Bitmap Converter

atobm option(s) filename

PURPOSE

The atobm command converts ASCII strings to a bitmap file. See the bitmap command for more explanation about X Window System bitmap files.

OPTIONS

-chars cc Sets the characters to use to specify the 0s and 1s that make up the bitmap file. The default is to use dashes (-) for 0s and sharp signs (#) for the 1s.
-name variable Sets the variable name used when writing the converted bitmap filename. The default is to use the basename of the filename command-line argument.
-yhot number Sets the “hot spot” Y-coordinate.

RELATED COMMANDS

bitmap
bmtoa

banner......Prints Banner

banner option message

PURPOSE

The banner command prints a banner of up to 10 characters using asterisks. The total width of the banner is 132 characters, and the banner is printed sideways.

EXAMPLE


$ banner kevin

OPTION

-w num Sets the width of the banner of num characters.

bash......Bourne Again Shell

bash option(s)

PURPOSE

The bash command launches the Bourne Again Shell, a clone of the popular UNIX shell. See Chapter 6 for more on bash.

bc......calculator

bc option(s) files

PURPOSE

The bc command acts as an online calculator, as well as a tool for unlimited-precision arithmetic. It can be used to enter numerals directly. It can be embedded into shell scripts, using a syntax similar to the C programming language. It can also be used to convert numerals to different bases.

After entering the bc command on a command line, arithmetic functions can be entered directly. When you’re through using the bc command, type EOF, quit, or Ctrl-C.

OPTIONS

-l Adds functions from the math library.
-s Overrides extensions, achieving POSIX conformity.
-p Prints a warning when using extensions to POSIX bc.

EXAMPLE


$ bc

scale=5

sqrt((55*6)/5)

8.12402

quit

COMMON INSTRUCTIONS

+ Addition.
- Subtraction.
/ Division.
* Multiplication.
% Remainder.
^ Exponentiation.
sqrt(n) Square root.

VALUE STORAGE

scale=n Sets scale using n decimal spaces; the default is 0. This is best used with base 10. The default also means that the output is in integers. The current value can be seen by entering only scale (and no value) by itself. For digits between 10 and 15, use the letters A–F.
ibase=n Sets the input base (the default is 10). The current value can be seen by entering only ibase (and no value) by itself. For digits between 10 and 15, use the letters A-F.
obase=x Sets the output base (the default is 10). The current value can be seen by entering only obase (and no value) by itself. For digits between 10 and 15, use the letters A–F.
last Returns the last value. For digits between 10 and 15, use the letters A–F.


Previous Table of Contents Next