Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Unix in a Nutshell, 4th Edition
Preface
Audience
Scope of This Book
Conventions
Using Code Examples
SafariĀ® Enabled
How to Contact Us
Acknowledgments
I. Commands and Shells
1. Introduction
1.1. Unix in the 21st Century
1.2. Obtaining Compilers
1.2.1. Solaris
1.2.2. GNU/Linux
1.2.3. Mac OS X
1.3. Building Software
1.4. What's in the Quick Reference
1.5. Beginner's Guide
1.5.1. Communication
1.5.2. Comparisons
1.5.3. File Management
1.5.4. Miscellaneous
1.5.5. Printing (BSD Commands)
1.5.6. Printing (System V Commands)
1.5.7. Programming
1.5.8. Searching
1.5.9. Shells
1.5.10. Shell Programming
1.5.11. Storage
1.5.12. System Status
1.5.13. Text Processing
1.6. Solaris: Standard Compliant Programs
2. Unix Commands
2.1. Introduction
2.1.1. Finding Commands on Solaris
2.1.2. Finding Commands on GNU/Linux and Mac OS X
2.2. Alphabetical Summary of Common Commands
aclocal
apropos
ar
as
at
atq
atrm
autoconf
autoheader
automake
awk
banner
basename
bash
batch
bc
biff
bison
bzip2
cal
calendar
cancel
cat
cc
cd
chgrp
chmod
chown
cksum
clear
cmp
comm
cp
cpio
crontab
csh
csplit
ctags
curl
cut
date
dc
dd
df
diff
diff3
dig
dirname
dos2unix
du
echo
ed
egrep
eject
emacs
env
etags
evim
ex
expand
expr
factor
false
fdformat
fgrep
file
find
finger
flex
fmt
ftp
g++
gcc
gcore
gdb
getconf
getopts
gettext
ghostscript
gprof
grep
groff
groups
gs
gunzip
gzcat
gzip
head
hexdump
hostname
iconv
id
info
join
kill
ksh
ld
ldd
less
lex
link
ln
locale
locate
logger
login
logname
look
lp
lpq
lpr
lprm
lpstat
ls
m4
mail
mailx
make
man
mesg
mkdir
mkisofs
mktemp
more
mount
msgfmt
mv
nawk
nice
nl
nm
nohup
nroff
od
passwd
paste
patch
pathchk
pax
perl
pr
printenv
printf
ps
pwd
python
r Commands
rcs
reset
rm
rmdir
rsync
samba
scp
screen
script
sdiff
sed
sftp
sh
size
sleep
soelim
sort
spell
split
ssh
ssh-add
ssh-agent
ssh-keygen
strings
strip
stty
su
tail
talk
tar
tcsh
tee
telnet
test
time
touch
tr
troff
true
tset
tty
type
umask
uname
umount
unexpand
uniq
units
unix2dos
unzip
uptime
users
uudecode
vi
view
vim
vimdiff
w
wait
wc
whatis
which
who
whoami
xargs
xgettext
yacc
zcat
zip
zipinfo
2.3. Alphabetical Summary of Solaris Commands
cde
cdrw
chkey
decrypt
digest
dircmp
dis
encrypt
enhance
filesync
gpatch
keylogin
keylogout
line
listusers
mac
mount
nawk
openwin
page
ps
rksh
setpgrp
sotruss
timex
truss
umount
vacation
volcheck
whocalls
2.4. Alphabetical Summary of GNU/Linux Commands
aspell
cdda2wav
cdparanoia
cdrdao
cdrecord
dir
dircolors
dvdrecord
gawk
gettextize
igawk
ispell
ltrace
lynx
mac2unix
md5sum
mount
mutt
ooffice
pdksh
ps
rename
seq
sha1sum
shred
skill
slocate
splint
strace
umount
watch
wget
xmlto
2.5. Alphabetical Summary of Mac OS X Commands
apply
chflags
chfn
chpass
chsh
defaults
developer
ditto
lam
leave
mount
nano
open-x11
pbcopy
pbpaste
pico
ps
pstopdf
pythonw
say
shar
shlock
srm
umount
2.6. Alphabetical Summary of Java Commands
appletviewer
apt
jar
jarsigner
java
javac
javadoc
javah
javap
jdb
keytool
rmic
rmid
rmiregistry
3. The Unix Shell: An Overview
3.1. Introduction to the Shell
3.2. Purpose of the Shell
3.2.1. Interactive Use
3.2.2. Customization of Your Unix Session
3.2.3. Programming
3.3. Shell Flavors
3.3.1. Which Shell Do I Want?
3.4. Shell Source Code URLs
3.5. Common Features
3.6. Differing Features
4. The Bash and Korn Shells
4.1. Overview of Features
4.2. Invoking the Shell
4.2.1. Options
4.2.1.1. Common options
4.2.1.2. Bash options
4.2.2. Arguments
4.3. Syntax
4.3.1. Special Files
4.3.2. Filename Metacharacters
4.3.2.1. Examples
4.3.3. Quoting
4.3.3.1. Examples
4.3.4. Command Forms
4.3.4.1. Examples
4.3.5. Redirection Forms
4.3.5.1. Simple redirection
4.3.5.2. Redirection using file descriptors
4.3.5.3. Multiple redirection
4.3.5.4. Examples
4.3.6. Coprocesses
4.3.6.1. Examples
4.4. Functions
4.5. Variables
4.5.1. Variable Substitution
4.5.1.1. Examples
4.5.2. Built-in Shell Variables
4.5.3. Other Shell Variables
4.5.4. Arrays
4.5.5. Discipline Functions (ksh93 Only)
4.5.6. Special Prompt Strings
4.6. Arithmetic Expressions
4.6.1. Operators
4.6.2. Built-in Mathematical Functions (ksh93 Only)
4.6.3. Examples
4.7. Command History
4.7.1. Line-Edit Mode
4.7.1.1. Common editing keystrokes
4.7.2. The fc and hist Commands
4.7.2.1. Examples
4.7.3. Programmable Completion (Bash Only)
4.7.3.1. Examples
4.8. Job Control
4.9. Command Execution
4.10. Restricted Shells
4.11. Built-in Commands (Bash and Korn Shells)
!
#
#!shell
:
.
[[ ]]
name ()
alias
autoload
bind
bg
break
builtin
builtin
caller
case
cd
command
compgen
complete
continue
declare
dirs
disown
disown
do
done
echo
echo
enable
esac
eval
exec
exit
export
false
fc
fc
fg
fi
for
for
function
functions
getconf
getopts
hash
hash
help
hist
history
history
if
integer
jobs
kill
let
local
login
logout
nameref
nohup
popd
print
printf
pwd
pushd
r
read
readonly
redirect
return
select
set
shopt
shift
sleep
source
stop
suspend
test
time
times
times
trap
true
type
type
typeset
ulimit
umask
unalias
unset
until
wait
whence
while
filename
5. tcsh: An Extended C Shell
5.1. Overview of Features
5.2. Invoking the Shell
5.2.1. Options
5.2.2. Arguments
5.3. Syntax
5.3.1. Special Files
5.3.2. Filename Metacharacters
5.3.2.1. Examples
5.3.3. Quoting
5.3.3.1. Examples
5.3.4. Command Forms
5.3.4.1. Examples
5.3.5. Redirection Forms
5.3.5.1. Simple redirection
5.3.5.2. Multiple redirection
5.3.5.3. Examples
5.4. Variables
5.4.1. Variable Substitution
5.4.1.1. Examples
5.4.2. Variable Modifiers
5.4.2.1. Examples using pathname modifiers
5.4.2.2. Examples using quoting modifiers
5.4.3. Predefined Shell Variables
5.4.4. Formatting for the Prompt Variable
5.4.5. Sample .tcshrc File
5.4.6. Environment Variables
5.5. Expressions
5.5.1. Operators
5.5.1.1. Assignment operators
5.5.1.2. Arithmetic operators
5.5.1.3. Bitwise and logical operators
5.5.1.4. Comparison operators
5.5.1.5. File inquiry operators
5.5.2. Examples
5.6. Command History
5.6.1. Command Substitution
5.6.2. Command Substitution Examples
5.6.3. Word Substitution
5.6.4. Word Substitution Examples
5.6.5. History Modifiers
5.6.5.1. Printing, substitution, and quoting
5.6.5.2. Truncation
5.6.6. History Modifier Examples
5.6.7. Special Aliases
5.6.7.1. Examples
5.7. Command-Line Manipulation
5.7.1. Completion
5.7.2. Related Shell Variables
5.7.3. Related Command-Line Editor Commands
5.7.4. Related Shell Built-ins
5.7.5. Command-Line Editing
5.7.5.1. Emacs mode
5.7.5.2. vi mode
5.8. Job Control
5.9. Built-in Commands
@
#
#!
:
alias
alloc
bg
bindkey
break
breaksw
built-ins
bye
case
cd
chdir
complete
continue
default
dirs
echo
echotc
else
end
endif
endsw
eval
exec
exit
fg
filetest
foreach
glob
goto
hashstat
history
hup
if
jobs
kill
limit
log
login
logout
ls-F
newgrp
nice
nohup
notify
onintr
popd
printenv
pushd
rehash
repeat
sched
set
setenv
settc
setty
shift
source
stop
suspend
switch
telltc
termname
time
umask
unalias
uncomplete
unhash
unlimit
unset
unsetenv
wait
watchlog
where
which
while
6. Package Management
6.1. Linux Package Management
6.2. The Red Hat Package Manager
6.2.1. RPM Package Concepts
6.2.2. The rpm Command
6.2.2.1. General options
6.2.2.2. Install, upgrade, and freshen options
6.2.2.3. Query options
6.2.2.4. Uninstall options
6.2.2.5. Verify options
6.2.2.6. Database rebuild options
6.2.2.7. Signature check options
6.2.2.8. Miscellaneous options
6.2.2.9. FTP/HTTP options
6.2.3. RPM Examples
6.2.4. The rpmbuild Command
6.2.4.1. rpmbuild options
6.3. Yum: Yellowdog Updater Modified
6.3.1. The yum Command
6.3.1.1. General options
6.3.2. Yum Command Summary
check-update
clean
generate-rss
groupinfo
groupinstall
grouplist
groupremove
groupupdate
info
install
list
localinstall
localupdate
makecache
provides
remove
search
update
upgrade
whatprovides
6.4. up2date: Red Hat Update Agent
6.4.1. Options
6.5. The Debian Package Manager
6.5.1. Files
6.5.2. Package Priorities
6.5.3. Package and Selection States
6.5.4. Package Flags
6.5.5. Scripts
6.5.6. Debian Package Manager Command Summary
apt-cache
apt-cdrom
apt-config
apt-extracttemplates
apt-ftparchive
apt-get
apt-sortpkgs
aptitude
dpkg
dpkg-deb
dpkg-query
dpkg-split
dselect
synaptic
6.6. Mac OS X Package Management
6.6.1. Fink and Fink Commander
6.6.2. The GNU Mac OS X Public Archive
6.6.3. Building from Source
6.7. Solaris Package Management
6.7.1. Solaris Package Management Command Summary
installf
pkgadd
pkgadm
pkgask
pkgchk
pkginfo
pkgmk
pkgparam
pkgproto
pkgrm
removef
II. Text Editing and Processing
7. Pattern Matching
7.1. Filenames Versus Patterns
7.2. Metacharacters
7.2.1. Search Patterns
7.2.2. Replacement Patterns
7.3. Metacharacters, Listed by Unix Program
7.4. Examples of Searching
7.4.1. Examples of Searching and Replacing
8. The Emacs Editor
8.1. Conceptual Overview
8.1.1. Modes
8.1.2. Buffer and Window
8.1.3. Point and Mark
8.1.4. Kill and Yank
8.1.5. Notes on the Tables
8.1.6. Absolutely Essential Commands
8.2. Command-Line Syntax
8.3. Summary of Commands by Group
8.3.1. File-Handling Commands
8.3.2. Cursor-Movement Commands
8.3.3. Deletion Commands
8.3.4. Paragraphs and Regions
8.3.5. Stopping and Undoing Commands
8.3.6. Transposition Commands
8.3.7. Search Commands
8.3.8. Capitalization Commands
8.3.9. Word-Abbreviation Commands
8.3.10. Buffer-Manipulation Commands
8.3.11. Window Commands
8.3.12. Special Shell Characters
8.3.13. Indentation Commands
8.3.14. Centering Commands
8.3.15. Macro Commands
8.3.16. Basic Indentation Commands
8.3.17. Detail Information Help Commands
8.3.18. Help Commands
8.4. Summary of Commands by Key
8.4.1. Control-Key Sequences
8.4.2. Meta-Key Sequences
8.5. Summary of Commands by Name
9. The vi, ex, and vim Editors
9.1. Conceptual Overview
9.2. Command-Line Syntax
9.2.1. Command-Line Options
9.3. Review of vi Operations
9.3.1. Command Mode
9.3.2. Insert Mode
9.3.3. Syntax of vi Commands
9.3.3.1. Examples
9.3.3.2. Visual mode (vim only)
9.3.4. Status-Line Commands
9.4. vi Commands
9.4.1. Movement Commands
9.4.1.1. Character
9.4.1.2. Text
9.4.1.3. Lines
9.4.1.4. Screens
9.4.1.5. Searches
9.4.1.6. Line numbering
9.4.1.7. Marks
9.4.2. Insert Commands
9.4.3. Edit Commands
9.4.3.1. Changing and deleting text
9.4.3.2. Copying and moving
9.4.4. Saving and Exiting
9.4.5. Accessing Multiple Files
9.4.6. Window Commands (vim)
9.4.7. Interacting with the System
9.4.8. Macros
9.4.9. Miscellaneous Commands
9.5. vi Configuration
9.5.1. The :set Command
9.5.2. Options Used by :set
9.5.3. Example .exrc File
9.6. ex Basics
9.6.1. Syntax of ex Commands
9.6.2. Addresses
9.6.3. Address Symbols
9.6.4. Options
9.7. Alphabetical Summary of ex Commands
abbreviate
append
args
bdelete
buffer
buffers
cd
center
change
close
copy
delete
edit
file
fold
foldclose
foldopen
global
hide
insert
join
jumps
k
left
list
map
mark
marks
mkexrc
move
new
next
nohlsearch
number
only
open
preserve
previous
print
put
qall
quit
read
read
recover
redo
resize
rewind
right
sbnext
sbuffer
set
shell
snext
source
split
sprevious
stop
substitute
suspend
sview
t
tag
tags
unabbreviate
undo
unhide
unmap
v
version
view
visual
visual
vsplit
wall
wnext
write
write
wq
wqall
X
xit
yank
z
&
@
=
!
< >
~
address
ENTER
10. The sed Editor
10.1. Conceptual Overview
10.1.1. Typical Uses of sed
10.1.2. sed Operation
10.2. Command-Line Syntax
10.2.1. Standard Options
10.2.2. GNU sed Options
10.3. Syntax of sed Commands
10.3.1. Pattern Addressing
10.3.2. Examples
10.3.3. GNU sed Regular Expression Extensions
10.4. Group Summary of sed Commands
10.4.1. Basic Editing
10.4.2. Line Information
10.4.3. Input/Output Processing
10.4.4. Yanking and Putting
10.4.5. Branching Commands
10.4.6. Multiline Input Processing
10.5. Alphabetical Summary of sed Commands
#
:
=
a
b
c
d
D
e
g
G
h
H
i
l
n
N
p
P
q
Q
r
R
s
t
T
v
w
W
x
y
11. The awk Programming Language
11.1. Conceptual Overview
11.2. Command-Line Syntax
11.2.1. Standard Options
11.2.2. Important gawk Options
11.3. Patterns and Procedures
11.3.1. Patterns
11.3.2. Procedures
11.3.3. Simple Pattern-Action Examples
11.4. Built-in Variables
11.5. Operators
11.6. Variable and Array Assignment
11.6.1. Escape Sequences
11.6.2. Octal and Hexadecimal Constants in gawk
11.7. User-Defined Functions
11.8. Gawk-Specific Features
11.8.1. Coprocesses and Sockets
11.8.2. Profiling
11.8.3. File Inclusion
11.8.4. Internationalization
11.9. Implementation Limits
11.10. Group Listing of awk Functions and Commands
11.11. Alphabetical Summary of awk Functions and Commands
#
and
asort
asorti
atan2
bindtextdomain
break
close
compl
continue
cos
dcgettext
dcngettext
delete
do
exit
exp
extension
fflush
for
for
function
gensub
getline
gsub
if
index
int
length
log
lshift
match
mktime
next
nextfile
or
print
printf
rand
return
rshift
sin
split
sprintf
sqrt
srand
strftime
strtonum
sub
substr
system
systime
tolower
toupper
while
xor
11.12. Output Redirections
11.12.1. printf Formats
11.13. Source Code
III. Software Development
12. Source Code Management: An Overview
12.1. Introduction and Terminology
12.2. Usage Models
12.3. Unix Source Code Management Systems
12.4. Other Source Code Management Systems
13. The Revision Control System
13.1. Overview of Commands
13.2. Basic Operation
13.3. General RCS Specifications
13.3.1. Keyword Substitution
13.3.2. Keywords
13.3.3. Example Values
13.3.4. Revision Numbering
13.3.5. Specifying the Date
13.3.6. Specifying States
13.3.7. Standard Options and Environment Variables
13.4. Alphabetical Summary of Commands
ci
co
ident
merge
rcs
rcsclean
rcsdiff
rcsfreeze
rcsmerge
rlog
14. The Concurrent Versions System
14.1. Conceptual Overview
14.1.1. CVS Wrappers
14.1.2. Stickiness
14.2. Command-Line Syntax and Options
14.2.1. cvs Options
14.2.2. Common Subcommand Options
14.3. Dot Files
14.4. Environment Variables
14.4.1. Client Environment Variables
14.4.2. Server Environment Variables
14.5. Keywords and Keyword Modes
14.6. Dates
14.6.1. Legal Date Formats
14.6.1.1. ISO 8601
14.6.1.2. RFC 822 and RFC 1123
14.6.2. Legal Date Keywords
14.6.3. Time Zones
14.7. CVSROOT Variables
14.7.1. Environment Variables in CVSROOT Files
14.7.2. Internal Variables in CVSROOT Files
14.7.3. Shell Variables in CVSROOT Files
14.8. Alphabetical Summary of Commands
add
admin
annotate
checkout
commit
diff
edit
editors
export
history
import
init
kserver
log
login
logout
pserver
rannotate
rdiff
release
remove
rlog
rtag
server
status
tag
unedit
update
version
watch
watchers
15. The Subversion Version Control System
15.1. Conceptual Overview
15.1.1. Basic Version Control Operations
15.1.2. Building a Better CVS
15.1.3. Converting a Repository from CVS to Subversion
15.1.4. Special File Properties
15.2. Obtaining Subversion
15.2.1. Subversion Releases
15.2.2. A View Down the Road
15.2.3. Source Code
15.3. Using Subversion: A Quick Tour
15.4. The Subversion Command Line Client: svn
15.4.1. svn Options
15.4.2. svn Subcommands
add
blame
cat
checkout
cleanup
commit
copy
delete
diff
export
help
import
info
list
log
merge
mkdir
move
propdel
propedit
propget
proplist
propset
resolved
revert
status
switch
update
15.5. Repository Administration: svnadmin
15.5.1. svnadmin Options
15.5.2. svnadmin Subcommands
create
deltify
dump
help
hotcopy
list-dblogs
list-unused-dblogs
load
lstxns
recover
rmtxns
setlog
verify
15.6. Examining the Repository: svnlook
15.6.1. svnlook Options
15.6.2. svnlook Subcommands
author
cat
changed
date
diff
dirs-changed
help
history
info
log
propget
proplist
tree
uuid
youngest
15.7. Providing Remote Access: svnserve
15.7.1. svnserve Options
15.8. Other Subversion Components
svndumpfilter
svnversion
16. The GNU make Utility
16.1. Conceptual Overview
16.2. Command-Line Syntax
16.2.1. Options
16.3. Makefile Lines
16.3.1. Special Dependencies
16.3.2. Conditional Input
16.4. Macros
16.4.1. Creating and Using Macros
16.4.1.1. Defining macros
16.4.1.2. Macro values
16.4.1.3. Exporting macros
16.4.1.4. Overriding command-line macros
16.4.2. Internal Macros
16.4.3. Macro Modifiers
16.4.4. Macros with Special Handling
16.4.5. Text Manipulation with Macros and Functions
16.5. Special Target Names
16.6. Writing Command Lines
17. The GDB Debugger
17.1. Conceptual Overview
17.1.1. Source Code Locations
17.2. Command-Line Syntax
17.3. Initialization Files
17.3.1. The .gdbinit File
17.3.2. The .inputrc File
17.4. GDB Expressions
17.4.1. The Value History
17.4.2. Convenience Variables and Machine Registers
17.4.3. Special Expressions
17.5. The GDB Text User Interface
17.6. Group Listing of GDB Commands
17.6.1. Aliases for Other Commands
17.6.2. Breakpoints
17.6.3. Examining Data
17.6.4. Controlling and Examining Files
17.6.5. Running a Program
17.6.6. Examining the Stack
17.6.7. Status Inquiries
17.6.8. Support Facilities
17.6.9. Text User Interface Commands
17.6.10. Frequently Used Commands
17.7. Summary of set and show Commands
annotate
architecture
args
auto-solib-add
auto-solib-limit
backtrace
breakpoint
can-use-hw-watchpoints
case-sensitive
coerce-float-to-double
commands
complaints
confirm
convenience
copying
cp-abi
debug-file-directory
demangle-style
directories
disassembly-flavor
editing
environment
exec-done-display
extension-language
follow-fork-mode
gnutarget
height
history
input-radix
language
listsize
logging
max-user-call-depth
opaque-type-resolution
osabi
output-radix
overload-resolution
pagination
paths
print
prompt
radix
scheduler-locking
solib-absolute-prefix
solib-search-path
step-mode
stop-on-solib-events
symbol-reloading
trust-readonly-sections
tui
values
variable
verbose
version
warranty
watchdog
width
write
17.8. Summary of the info Command
17.9. Alphabetical Summary of GDB Commands
add-symbol-file
advance
apropos
attach
awatch
backtrace
break
call
catch
cd
clear
commands
complete
condition
continue
core-file
define
delete
detach
directory
disable
disassemble
display
document
dont-repeat
down
down-silently
echo
edit
else
enable
end
exec-file
fg
file
finish
focus
forward-search
frame
generate-core-file
handle
hbreak
help
if
ignore
inspect
info
jump
kill
layout
list
macro
make
mem
next
nexti
nosharedlibrary
output
path
print
print-object
printf
ptype
pwd
quit
rbreak
refresh
return
reverse-search
run
rwatch
search
section
select-frame
set
sharedlibrary
shell
show
signal
silent
source
step
stepi
symbol-file
tbreak
tcatch
thbreak
thread
tty
tui
undisplay
unset
until
up
up-silently
update
watch
whatis
where
while
winheight
x
18. Writing Manual Pages
18.1. Introduction
18.2. Overview of nroff/troff
18.2.1. Command-Line Invocation
18.2.1.1. Example
18.2.2. Conceptual Overview
18.2.2.1. Requests and macros
18.2.2.2. Specifying measurements
18.2.2.3. Requests that cause a line break
18.2.2.4. Embedded formatting controls
18.2.3. Outline of Useful Requests
18.2.4. Useful Escape Sequences
18.2.5. Special Characters
18.3. Alphabetical Summary of man Macros
.B
.BI
.BR
.DT
.HP
.I
.IB
.IP
.IR
.LP
.P
.PD
.PP
.RB
.RE
.RI
.RS
.SB
.SH
.SM
.SS
.TH
.TP
18.4. Predefined Strings
18.5. Internal Names
18.6. Sample Document
IV. References
A. ISO 8859-1 (Latin-1) Character Set
B. Bibliography
Unix Descriptions and Programmer's Manuals
Unix Internals
System and Network Administration
Programming with the Unix Mindset
Programming Languages
TCP/IP Networking
Software Development
Emacs
Standards
O'Reilly Books
Index
Colophon
← Prev
Back
Next →
← Prev
Back
Next →