Appendix A: Command Classification


This appendix is a guide to the common standard commands. They are organized in the following tables:

Table A-1: File Management Commands

Command

Description

chgrp

Changes a file's group

chmod

Changes a file's permissions

chown

Changes a file's user ownership

cp

Copies a file

dd

Converts and copies

df

Displays disk usage statistics

du

Displays directory space usage

file

Identifies a file type

find

Searches for a file

ln

Creates a symbolic or hard link

ls

Lists files

mkdir

Creates a directory

mkfifo

Creates a named pipe

mknod

Creates a special file

mv

Renames or moves a file

rm

Removes a file

touch

Creates a file or updates a file's timestamp

Table A-2: Text Processing and Scripting Commands

Command

Description

awk

The awk general-purpose text processing language

basename

Strips extensions and directories from filenames

cat

Displays and concatenates files

cmp

Compares binary files

cut

Extracts columns of lines

diff

Compares text files

dirname

Extracts the directory from a filename

echo

Prints text

ed

A classic line-based text editor

egrep

Extended grep

ex

A newer line-based text editor

expr

Evaluates a mathematical expression

false

Returns a nonzero exit code

fmt

Breaks long lines and reformats text

grep

Searches for lines matching a regular expression

groff

A multi-purpose typesetting utility

head

Displays the first lines of a file

ispell

A spelling checker

less

Displays a text file

more

Displays a text file

nroff

Formats roff documents for text display

patch

Incorporates changes into files; the opposite of diff

perl

A general-purpose scripting language

sed

A stream editor

sort

Sorts lines in a file

split

Chops a file into pieces

tail

Displays the last lines of a file

tee

Duplicates a file stream

test

([) Checks a condition

tr

Translates (or substitutes) characters

true

Returns an exit code of 0 (true)

uniq

Removes duplicate adjacent lines

vi

A visual full-screen editor

wc

Counts words, lines, and characters in a file

xargs

Executes a command repeatedly with arguments from the input stream

Table A-3: Online Documentation Commands

Command

Description

info

Displays GNU-style documentation

man

Displays the traditional Unix online manual

Table A-4: Process and System Utility Commands

Command

Description

at

Runs a program at a certain time

chfn

Changes finger information

chsh

Changes shells

crontab

Runs a periodic job

groups

Shows group membership

id

Shows the current user ID

kill

Sends a signal to a process

logger

Records a message to the system logger

login

Allows a user to login

lsof

Lists open files and other information

mount

Attaches a filesystem to a directory tree

newgrp

Changes the current default group

nice

Runs a process with a suggested priority

passwd

Changes a password

printenv

Prints environment variables

ps

Displays processes

renice

Changes the suggested priority for a process

reset

Attempts to reset the terminal

strace

Traces system calls

su

Switches users

sync

Writes kernel buffers to disk

time

Displays how much processor and system time a process takes

top

Shows the processes with the most resource consumption

umount

Detaches a filesystem from a directory tree

Table A-5: System Information Commands

Command

Description

arch

Displays the system architecture

df

Displays disk usage statistics

dmesg

Displays buffered kernel messages

finger

Displays user information

free

Displays free memory statistics

hostname

Displays the current host's name

last

Shows the last users who logged in

tty

Displays the current terminal name

uptime

Displays system load and how long the system has been running

vmstat

Displays virtual memory statistics

uname

Displays kernel identification information

w

Displays uptime information and current users

who

Displays current users

whoami

Displays the current user

Table A-6: Archival and Compression Commands

Command

Description

bunzip2

A decompression program

bzip2

A decompression program

cpio

An archival program

gunzip

A decompression program

gzip

A compression program

tar

An archival program

uncompress

A decompression program

unshar

A de-archival program

uudecode

A decoding program (the counterpart of uuencode)

uuencode

Encodes binary file into a text file

zcat

Decompresses into a file stream

Table A-7: Miscellaneous Utility Commands

Command

Description

bc

A simple calculator

cal

Shows a calendar

date

Displays the current date

dc

Runs the RPN calculator

pwd

Prints the working directory

script

Starts a shell where all output is recorded in a file

sleep

Pauses for a specified number of seconds

strings

Attempts to show any text embedded in a binary file

yes

Prints an endless stream of lines

which

Displays the first matching program in the current path

Table A-8: Development Commands

Command

Description

ar

A library archiver

as

An assembler

c++

A C++ compiler

cc

A C compiler

cpp

A C preprocessor

g++

A C++ compiler (see c++ )

gcc

A C compiler (see cc )

gdb

The GNU debugger

install

Copies a file into a location with certain parameters

ld

linker

ldd

Displays dynamic libraries

make

A package-building tool

perl

A general-purpose scripting language

Table A-9: Shells

Command

Description

bash

The Bourne Again Shell

csh

The C Shell

ksh

The Korn Shell

sh

The Bourne Shell

tcsh

The TC Shell




How Linux Works
How Linux Works: What Every Superuser Should Know
ISBN: 1593270356
EAN: 2147483647
Year: 2004
Pages: 189
Authors: Brian Ward

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net