Directory listing of http: uap.unnes.ac.id ebook linux ebook Complete LINUX Command Reference

Introduction

i

LINUX COMPLETE
Command Reference
Compiled by J. Purcell
Red Hat Software, Inc.

201 West 103rd Street
Indianapolis, Indiana 46290

For more information on the Linux operating system and
Red Hat Software, Inc., check http://www.redhat.com.

Acquisitions Editor

COPYRIGHT © 1997 BY RED HAT SOFTWARE, INC.

Grace M. Buechlein


FIRST EDIT ION
All rights reserved. No part of this book shall be reproduced, stored in a retrieval
system, or transmitted by any means, electronic, mechanical, photocopying,
recording, or otherwise, without written permission from the publisher. No
patent liability is assumed with respect to the use of the information contained
herein. Although every precaution has been taken in the preparation of this
book, the publisher and author assume no responsibility for errors or omissions.
Neither is any liability assumed for damages resulting from the use of the
information contained herein. For information, address Sams Publishing, 201
W. 103rd St., Indianapolis, IN 46290.

Software Development Specialist
Jack Belbot

Production Editor
Kitty Wilson Jarrett
Kate Shoup Welsh
Kimberly K. Hannel
Carolyn Linn
Kristine Simmons


Library of Congress Catalog Card Number: 97-66202
4 3 2 1

Interpretation of the printing code: the rightmost double-digit number is the
year of the book’s printing; the rightmost single-digit, the number of the book’s
printing. For example, a printing code of 97-1 shows that the first printing of the
book occurred in 1997.
Composed in AGaramond and MCPdigital by Macmillan Computer Publishing

Indexer
Christine L. Nelsen

Technical Reviewer
Bill Ball

Editorial Coordinators
Mandie Rowell
Katie Wise


Printed in the United States of America

TRADEMARKS
All terms mentioned in this book that are known to be trademarks or service
marks have been appropriately capitalized. Sams Publishing cannot attest to the
accuracy of this information. Use of a term in this book should not be regarded
as affecting the validity of any trademark or service mark.

President
Publisher and Director of Acquisitions
Director of Product Development
Managing Editor
Indexing Manager
Director of Marketing
Associate Product Marketing Manager
Marketing Coordinator

Brian Proffitt

Copy Editors


International Standard Book Number: 0-672-31104-6

2000 99 98 97

Development Editor

Richard K. Swadley
Jordan Gold
Dean Miller
Kitty Wilson Jarrett
Johnna L. VanHoose
Kelli S. Spencer
Jennifer Pock
Linda Beckwith

Technical Edit Coordinator
Lynette Quinn

Editorial Assistants

Carol Ackerman
Andi Richter
Rhonda Tinch-Mize
Karen Williams

Cover Designer
Karen Ruggles

Book Designer
Ann Jones

Copy Writer
David Reichwein

Production Team Supervisor
Beth Lewis

Production Team
Erin Danielson, Bryan Flores,
DiMonique Ford, Julie Geeting,

Kay Hoskin, Christy M. Lemasters,
Tony McDonald, Darlena Murray,
Julie Searls, Sossity Smith

Overview
Part I
User Commands

2

Part II
System Calls

738

Library Functions

892

Part III

Part IV
Special Files

1064

File Formats

1104

Games

1210

Miscellaneous

1214

Part V
Part VI
Part VII

Part VIII
Administration and Privileged Commands

1258

Kernel Reference Guide

1424

Part IX
Index

iv

Linux Complete Command Reference

Part

I


User Commands

Introduction ......................................................................................................... 2
addftinfo ............................................................................................................... 2
afmtodit ................................................................................................................ 2
ansi2knr ................................................................................................................ 4
anytopnm ............................................................................................................. 4
appres ................................................................................................................... 5
ar .......................................................................................................................... 5
arch ....................................................................................................................... 8
GNU as ................................................................................................................ 8
asciitopgm ........................................................................................................... 10
atktopbm ............................................................................................................ 10
bash .................................................................................................................... 11
bdftopcf .............................................................................................................. 47
beforelight ........................................................................................................... 47
biff ...................................................................................................................... 48
bioradtopgm ....................................................................................................... 48
bitmap, bmtoa, atobm ........................................................................................ 49
bmptoppm .......................................................................................................... 57

brushtopbm ........................................................................................................ 57
cal ....................................................................................................................... 58
cat ....................................................................................................................... 58
chattr .................................................................................................................. 59
chfn .................................................................................................................... 60
chgrp................................................................................................................... 61
chkdupexe ........................................................................................................... 61
chmod................................................................................................................. 61
chown ................................................................................................................. 62
chsh .................................................................................................................... 63
ci ......................................................................................................................... 64
cidentd ................................................................................................................ 69
cksum ................................................................................................................. 70
clear .................................................................................................................... 70
cmuwmtopbm .................................................................................................... 71
co ........................................................................................................................ 71
col ....................................................................................................................... 76
colcrt ................................................................................................................... 77
colrm .................................................................................................................. 77
column ................................................................................................................ 78

comm.................................................................................................................. 78

Introduction

convdate.............................................................................................................. 79
cp ........................................................................................................................ 80
cccp, cpp ............................................................................................................. 81
crontab ................................................................................................................ 84
csplit ................................................................................................................... 85
ctags .................................................................................................................... 87
cu ........................................................................................................................ 88
cut ...................................................................................................................... 90
cvs ....................................................................................................................... 91
date ................................................................................................................... 106
dd ..................................................................................................................... 108
depmod, modprobe........................................................................................... 109
df ...................................................................................................................... 112
dig .................................................................................................................... 113
dnsquery ........................................................................................................... 117
domainname ..................................................................................................... 119
dsplit ................................................................................................................. 119
du ..................................................................................................................... 120
editres ............................................................................................................... 121
elvis, ex, vi, view, input ..................................................................................... 126
elvprsv............................................................................................................... 128
elvrec ................................................................................................................. 129
emacs ................................................................................................................ 130
emacstool .......................................................................................................... 134
etags .................................................................................................................. 135
expand .............................................................................................................. 137
find ................................................................................................................... 137
fitstopnm .......................................................................................................... 142
fmt .................................................................................................................... 143
fold ................................................................................................................... 143
free .................................................................................................................... 144
fsinfo ................................................................................................................. 145
fslsfonts ............................................................................................................. 145
fstobdf............................................................................................................... 146
fstopgm ............................................................................................................. 147
ftp ..................................................................................................................... 147
fuser .................................................................................................................. 154
g++.................................................................................................................... 155
g3topbm ........................................................................................................... 160
gawk ................................................................................................................. 161

v

vi

Linux Complete Command Reference

gcal ................................................................................................................... 173
gcc, g++............................................................................................................. 174
gemtopbm ........................................................................................................ 201
geqn .................................................................................................................. 202
getlist ................................................................................................................ 206
getopt ................................................................................................................ 207
giftopnm ........................................................................................................... 208
gindxbib ............................................................................................................ 209
glookbib ............................................................................................................ 210
gnroff ................................................................................................................ 210
gouldtoppm ...................................................................................................... 211
gpic ................................................................................................................... 211
gprof ................................................................................................................. 216
grefer................................................................................................................. 217
grep, egrep, fgrep .............................................................................................. 224
grephistory ........................................................................................................ 226
grodvi ............................................................................................................... 227
groff .................................................................................................................. 228
grog .................................................................................................................. 230
grops ................................................................................................................. 230
grotty ................................................................................................................ 235
gsoelim .............................................................................................................. 236
gtbl ................................................................................................................... 236
gtroff ................................................................................................................. 237
gzip, gunzip, zcatgzip, gunzip, zcat .................................................................... 248
gzexe ................................................................................................................. 252
head .................................................................................................................. 253
hexdump ........................................................................................................... 254
hipstopgm ......................................................................................................... 256
host ................................................................................................................... 257
hostid ................................................................................................................ 258
hostname .......................................................................................................... 259
hpcdtoppm v0.3 ................................................................................................ 260
httpd ................................................................................................................. 261
icontopbm ........................................................................................................ 262
ident ................................................................................................................. 262
ilbmtoppm ........................................................................................................ 263
imake ................................................................................................................ 264
imgtoppm ......................................................................................................... 267
inews................................................................................................................. 267
info ................................................................................................................... 269
innconfval ......................................................................................................... 270
insmod .............................................................................................................. 271
install ................................................................................................................ 272
installit .............................................................................................................. 273

Introduction

ispell, buildhash, munchlist, findaffix, tryaffix, icombine, ijoin ......................... 274
join ................................................................................................................... 282
kill .................................................................................................................... 283
killall ................................................................................................................. 284
ksyms ................................................................................................................ 284
last .................................................................................................................... 285
lbxproxy ............................................................................................................ 286
ld ...................................................................................................................... 287
lispmtopgm ....................................................................................................... 292
lkbib ................................................................................................................. 292
ln ...................................................................................................................... 293
lndir .................................................................................................................. 294
locate ................................................................................................................ 295
logger ................................................................................................................ 295
login .................................................................................................................. 296
look ................................................................................................................... 297
lpq .................................................................................................................... 298
lpr ..................................................................................................................... 299
lprm .................................................................................................................. 301
lptest ................................................................................................................. 302
ls, dir, vdir......................................................................................................... 303
lsattr .................................................................................................................. 304
lsmod ................................................................................................................ 305
lynx ................................................................................................................... 306
macptopbm ....................................................................................................... 309
make ................................................................................................................. 310
makedepend ...................................................................................................... 312
makestrs ............................................................................................................ 314
mattrib .............................................................................................................. 315
mbadblocks ....................................................................................................... 316
mcd................................................................................................................... 316
mcookie ............................................................................................................ 317
mcopy ............................................................................................................... 317
md5sum ............................................................................................................ 318
mdel .................................................................................................................. 318
mdeltree ............................................................................................................ 319
mdir .................................................................................................................. 319
merge ................................................................................................................ 320
mesg.................................................................................................................. 321
mformat ............................................................................................................ 321
mgrtopbm ......................................................................................................... 322
mkdir ................................................................................................................ 323
mkdirhier .......................................................................................................... 323
mkfifo ............................................................................................................... 323
mkmanifest ....................................................................................................... 324

vii

viii

Linux Complete Command Reference

mknod .............................................................................................................. 325
mlabel ............................................................................................................... 325
mmd ................................................................................................................. 326
mmount ............................................................................................................ 326
mmove .............................................................................................................. 327
more ................................................................................................................. 327
mrd ................................................................................................................... 329
mread................................................................................................................ 329
mren ................................................................................................................. 329
mtest ................................................................................................................. 330
mtools ............................................................................................................... 330
mtvtoppm ......................................................................................................... 333
mtype................................................................................................................ 333
mv .................................................................................................................... 334
mwrite .............................................................................................................. 335
namei ................................................................................................................ 335
newaliases.......................................................................................................... 336
newgrp .............................................................................................................. 336
nl ...................................................................................................................... 337
nlmconv............................................................................................................ 338
nm .................................................................................................................... 339
nntpget ............................................................................................................. 340
objcopy ............................................................................................................. 341
objdump ........................................................................................................... 342
oclock ............................................................................................................... 344
od ..................................................................................................................... 345
passwd .............................................................................................................. 346
paste.................................................................................................................. 347
pbmclean .......................................................................................................... 348
pbmfilters.......................................................................................................... 348
pbmlife ............................................................................................................. 352
pbmmake .......................................................................................................... 353
pbmmask .......................................................................................................... 353
pbmpscale ......................................................................................................... 354
pbmreduce ........................................................................................................ 355
pbmtext ............................................................................................................ 355
pbmto10x ......................................................................................................... 356
pbmto4425 ....................................................................................................... 357
pbmtoascii ........................................................................................................ 357
pbmtoatk .......................................................................................................... 358
pbmtobg ........................................................................................................... 358
pbmtocmuwm .................................................................................................. 358
pbmtoepsi ......................................................................................................... 359
pbmtoepson ...................................................................................................... 359
pbmtog3 ........................................................................................................... 360

Introduction

pbmtogem ........................................................................................................ 360
pbmtogo ........................................................................................................... 360
pbmtoicon ........................................................................................................ 361
pbmtolj ............................................................................................................. 361
pbmtoln03 ........................................................................................................ 362
pbmtolps........................................................................................................... 362
pbmtomacp ....................................................................................................... 363
pbmtomgr ......................................................................................................... 363
pbmtopgm ........................................................................................................ 364
pbmtopi3 .......................................................................................................... 364
pbmtopk ........................................................................................................... 364
pbmtoplot ......................................................................................................... 365
pbmtoptx .......................................................................................................... 366
pbmtox10bm .................................................................................................... 366
pbmtoxbm ........................................................................................................ 367
pgmtoybm ........................................................................................................ 367
pbmtozinc ......................................................................................................... 367
pbmupc ............................................................................................................ 368
pcxtoppm .......................................................................................................... 368
pfbtops.............................................................................................................. 369
pgmbentley ....................................................................................................... 369
pgmcrater .......................................................................................................... 370
pgmedge ........................................................................................................... 371
pgmenhance ...................................................................................................... 371
pgmhist ............................................................................................................. 372
pgmkernel ......................................................................................................... 372
pgmnoise .......................................................................................................... 373
pgmnorm .......................................................................................................... 373
pgmoil .............................................................................................................. 374
pgmramp .......................................................................................................... 374
pgmtexture ........................................................................................................ 375
pgmtofs ............................................................................................................. 376
pgmtolispm ....................................................................................................... 376
pgmtopbm ........................................................................................................ 377
pgmtoppm ........................................................................................................ 378
pi1toppm .......................................................................................................... 378
pi3topbm .......................................................................................................... 379
picttoppm ......................................................................................................... 379
pjtoppm ............................................................................................................ 381
pktopbm ........................................................................................................... 381
pnmalias............................................................................................................ 381
pnmarith ........................................................................................................... 382
pnmcat .............................................................................................................. 383
pnmcomp ......................................................................................................... 383
pnmconvol ........................................................................................................ 384

ix

x

Linux Complete Command Reference

pnmcrop ........................................................................................................... 385
pnmcut ............................................................................................................. 385
pnmdepth ......................................................................................................... 385
pnmenlarge ....................................................................................................... 386
pnmfile ............................................................................................................. 386
pnmflip ............................................................................................................. 387
pnmgamma ....................................................................................................... 387
pnmhistmap ...................................................................................................... 388
pnmindex .......................................................................................................... 388
pnminvert ......................................................................................................... 389
pnmmargin ....................................................................................................... 389
pnmnlfilt ........................................................................................................... 390
pnmnoraw ........................................................................................................ 391
pnmpad ............................................................................................................ 392
pnmpaste .......................................................................................................... 392
pnmrotate ......................................................................................................... 393
pnmscale ........................................................................................................... 393
pnmshear .......................................................................................................... 394
pnmsmooth ...................................................................................................... 395
pnmtile ............................................................................................................. 395
pnmtoddif ......................................................................................................... 396
pnmtofits .......................................................................................................... 396
pnmtops............................................................................................................ 397
pnmtorast ......................................................................................................... 398
pnmtosgi ........................................................................................................... 398
pnmtosir ........................................................................................................... 399
pnmtotiff .......................................................................................................... 399
pnmtoxwd ........................................................................................................ 400
ppm3d .............................................................................................................. 400
ppmbrighten ..................................................................................................... 401
ppmchange ....................................................................................................... 401
ppmdim ............................................................................................................ 402
ppmdist ............................................................................................................. 402
ppmdither ......................................................................................................... 403
ppmflash ........................................................................................................... 404
ppmforge .......................................................................................................... 404
ppmhist ............................................................................................................. 408
ppmmake .......................................................................................................... 408
ppmmix ............................................................................................................ 408
ppmnorm .......................................................................................................... 409
ppmntsc ............................................................................................................ 409
ppmpat ............................................................................................................. 410
ppmquant ......................................................................................................... 411
ppmquantall...................................................................................................... 412
ppmqvga ........................................................................................................... 412

Introduction

ppmrelief .......................................................................................................... 413
ppmshift ........................................................................................................... 413
ppmspread ........................................................................................................ 414
ppmtoacad ........................................................................................................ 414
ppmtobmp ........................................................................................................ 416
ppmtogif ........................................................................................................... 416
ppmtoicr ........................................................................................................... 417
ppmtoilbm ........................................................................................................ 418
ppmtomap ........................................................................................................ 419
ppmtomitsu ...................................................................................................... 420
ppmtopcx .......................................................................................................... 421
ppmtopgm ........................................................................................................ 421
ppmtopi1 .......................................................................................................... 422
ppmtopict ......................................................................................................... 422
ppmtopj ............................................................................................................ 423
ppmtopjxl ......................................................................................................... 424
ppmtopuzz ........................................................................................................ 424
ppmtorgb3 ........................................................................................................ 425
ppmtosixel ........................................................................................................ 425
ppmtotga .......................................................................................................... 426
ppmtouil ........................................................................................................... 427
ppmtoxpm ........................................................................................................ 427
ppmtoyuv ......................................................................................................... 428
ppmtoyuvsplit ................................................................................................... 428
pr ...................................................................................................................... 429
ps ...................................................................................................................... 430
psbb .................................................................................................................. 433
psidtopgm ......................................................................................................... 433
pstopnm ............................................................................................................ 434
pstree ................................................................................................................ 435
psupdate ........................................................................................................... 436
qrttoppm .......................................................................................................... 436
quota................................................................................................................. 437
ranlib ................................................................................................................ 437
rasttopnm ......................................................................................................... 438
rawtopgm .......................................................................................................... 439
rawtoppm ......................................................................................................... 439
rcp .................................................................................................................... 440
rcs ..................................................................................................................... 441
rcsclean ............................................................................................................. 443
rcsdiff ................................................................................................................ 445
rcsfreeze ............................................................................................................ 446
rcsintro ............................................................................................................. 447
rcsmerge ............................................................................................................ 449
rdist .................................................................................................................. 451

xi

xii

Linux Complete Command Reference

reconfig ............................................................................................................. 454
ref ..................................................................................................................... 455
reset .................................................................................................................. 456
resize ................................................................................................................. 456
rev..................................................................................................................... 457
rgb3toppm ........................................................................................................ 457
rlog ................................................................................................................... 458
rlogin ................................................................................................................ 460
rm ..................................................................................................................... 461
rmdir ................................................................................................................ 462
rmmod .............................................................................................................. 462
rnews ................................................................................................................ 463
rpcgen ............................................................................................................... 464
rsh ..................................................................................................................... 466
rstart ................................................................................................................. 467
rstartd ............................................................................................................... 468
rup .................................................................................................................... 472
rusers ................................................................................................................ 472
rwall .................................................................................................................. 473
rwho ................................................................................................................. 474
script ................................................................................................................. 474
sed .................................................................................................................... 475
sessreg ............................................................................................................... 480
setterm .............................................................................................................. 482
sgitopnm ........................................................................................................... 483
shar ................................................................................................................... 484
shlock................................................................................................................ 487
showrgb ............................................................................................................ 488
shrinkfile ........................................................................................................... 488
sirtopnm ........................................................................................................... 488
size .................................................................................................................... 489
sldtoppm ........................................................................................................... 490
smproxy .................................................................................