i Introduction gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 201 West 103rd Street Indianapolis, Indiana 46290 LINUX COMPLETE Command Reference For more information on the Linux operating system and Red Hat Software, Inc., check http://www.redhat.com . Compiled by J. Purcell Red Hat Software, Inc. President Richard K. Swadley Publisher and Director of Acquisitions Jordan Gold Director of Product Development Dean Miller Managing Editor Kitty Wilson Jarrett Indexing Manager Johnna L. VanHoose Director of Marketing Kelli S. Spencer Associate Product Marketing Manager Jennifer Pock Marketing Coordinator Linda Beckwith COPYRIGHT © 1997 BY RED HAT SOFTWARE, INC. FIRST EDITION 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. International Standard Book Number: 0-672-31104-6 Library of Congress Catalog Card Number: 97-66202 2000 99 98 97 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 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. Acquisitions Editor Grace M. Buechlein Development Editor Brian Proffitt Software Development Specialist Jack Belbot Production Editor Kitty Wilson Jarrett Kate Shoup Welsh Copy Editors Kimberly K. Hannel Carolyn Linn Kristine Simmons Indexer Christine L. Nelsen Technical Reviewer Bill Ball Editorial Coordinators Mandie Rowell Katie Wise 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 Part III Library Functions 892 Part IV Special Files 1064 Part V File Formats 1104 Part VI Games 1210 Part VII Miscellaneous 1214 Part VIII Administration and Privileged Commands 1258 Part IX Kernel Reference Guide 1424 Index Linux Complete Command Reference iv gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 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 v Introduction gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 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 Linux Complete Command Reference vi gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 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 vii Introduction gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 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 Linux Complete Command Reference viii gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 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 ix Introduction gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 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 Linux Complete Command Reference x gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 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 [...]... 441 rcsclean 443 rcsdiff 445 rcsfreeze 446 rcsintro 447 rcsmerge 449 rdist 451 gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xii Linux Complete Command Reference reconfig 454 ref 455 reset 456 resize 456 rev 457 rgb3toppm ... 587 xbmtopbm 592 xcmsdb 592 xclock 593 xclipboard 595 xconsole 597 xcutsel 598 gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xiv Linux Complete Command Reference xdm 599 xdpyinfo 614 Xf86_Accel 614 XF86_Mono 624 XF86_SVGA 627 XF86_VGA16... getitimer, setitimer 763 getpagesize 765 getpeername 765 getpid, getppid 766 getpriority, setpriority 766 gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xvi Linux Complete Command Reference getrlimit, getrusage, setrlimit 767 getsid 768 getsockname 769 getsockopt, setsockopt 769... 862 stat, fstat, lstat 863 statfs, fstatfs 865 stime 866 swapon, swapoff 866 symlink 867 gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xviii Linux Complete Command Reference sync 869 sysctl 869 sysfs 871 sysinfo 871 syslog 872 termios,... 926 frexp 927 fgetpos, fseek, fsetpos, ftell, rewind 927 ftime 928 ftok 929 ftw 930 gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xx Linux Complete Command Reference gcvt 930 getcwd, get_current_dir_name, getwd 931 getdirentries 931 getenv 932 getgrent,... regcomp, regexec, regerror, regfree 1005 remove 1007 res_query, res_search, res_mkquery, res_send, res_init, dn_comp, dn_expand 1008 gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xxii Linux Complete Command Reference rewinddir 1011 rint 1011 rquota 1012 scandir, alphasort 1012 scanf, fscanf, sscanf,... vcsa 1101 Part V File Formats intro 1104 active, active.times 1104 adduser.conf 1105 aliases 1106 gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xxiv Linux Complete Command Reference cfingerd 1106 cfingerd.conf 1109 cfingerd text rules 1115 control.ctl 1115 cvs ... 1259 archive 1262 arp 1263 badblocks 1264 buffchan 1264 cfdisk 1265 chat 1269 gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xxvi Linux Complete Command Reference chroot 1273 clock 1273 comsat 1274 crond 1275 ctlinnd 1276 ctrlaltdel... setfdprm 1391 setserial 1391 setsid 1395 showmount 1396 shutdown 1396 simpleinit 1397 gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xxviii Linux Complete Command Reference slattach 1399 sliplogin 1399 swapon, swapoff 1401 sync 1401 sysklogd ... Valente (svalente@mit.edu), copyright 1992 Rickard E Faith (faith@cs.unc.edu) klogd(8), sysklogd(8) gr11 copyright 1994 Greg Wettstein, Enjellic Systems Development Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 xxxii Linux Complete Command Reference setterm(1) copyright 1990 Gordon Irlam (gordoni@cs.ua.oz.au) Copyright 1992 Rickard E Faith (faith@cs.unc.edu) tunelp(8), ps(1), psupdate(8) . Introduction gr11 Linux Complete Command Reference 31104-6 christy 11.6.97 FM lp3 201 West 103rd Street Indianapolis, Indiana 46290 LINUX COMPLETE Command. Commands 1258 Part IX Kernel Reference Guide 1424 Index Linux Complete Command Reference iv gr11 Linux Complete Command Reference 31104-6 christy 11.6.97