Sams Inc Linux Complete Command Reference Dec 1997 ISBN 0672311046 pdf

  

  

  President Richard K. Swadley Publisher and Director of Acquisitions Jordan Gold Director of Product Development Dean Miller Managing Editor Kitty Wilson Jarrett

  Copy Editors Kimberly K. Hannel Carolyn Linn Kristine Simmons

  Copy Writer David Reichwein

  Book Designer Ann Jones

  Cover Designer Karen Ruggles

  Editorial Assistants Carol Ackerman Andi Richter Rhonda Tinch-Mize Karen Williams

  Technical Edit Coordinator Lynette Quinn

  Editorial Coordinators Mandie Rowell Katie Wise

  Technical Reviewer Bill Ball

  Indexer Christine L. Nelsen

  Production Editor Kitty Wilson Jarrett Kate Shoup Welsh

  Indexing Manager Johnna L. VanHoose Director of Marketing Kelli S. Spencer Associate Product Marketing Manager Jennifer Pock COPYRIGHT © 1997 BY RED HAT SOFTWARE, INC.

  Software Development Specialist Jack Belbot

  Development Editor Brian Proffitt

  Acquisitions Editor Grace M. Buechlein

  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.

  TRADEMARKS

  Composed in AGaramond and MCPdigital by Macmillan Computer Publishing Printed in the United States of America

  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.

  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.

  Production Team Supervisor Beth Lewis

  Overview

  

   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

  

  

  v Introduction

  Linux Complete Command Reference vi 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

  Introduction vii 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

  Linux Complete Command Reference viii 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

  Introduction ix 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

  Linux Complete Command Reference x 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

  Introduction xi 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

  Linux Complete Command Reference xii 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 ............................................................................................................ 491 sort .................................................................................................................... 492 spctoppm .......................................................................................................... 494 split ................................................................................................................... 494 spottopgm ......................................................................................................... 495 sputoppm .......................................................................................................... 495 sq ...................................................................................................................... 496

  Introduction xiii tac ..................................................................................................................... 503 tail .................................................................................................................... 504 talk .................................................................................................................... 505 tcal .................................................................................................................... 506 telnet ................................................................................................................. 507 tfmtodit ............................................................................................................ 513 tftp .................................................................................................................... 514 tgatoppm .......................................................................................................... 515 tifftopnm .......................................................................................................... 515 tin, rtin, cdtin, tind ........................................................................................... 516 tload.................................................................................................................. 533 top .................................................................................................................... 533 touch ................................................................................................................ 536 tr ....................................................................................................................... 536 tset, reset ........................................................................................................... 539 tsort .................................................................................................................. 542 twm .................................................................................................................. 542 txt2gcal ............................................................................................................. 558 ul ...................................................................................................................... 558 unexpand .......................................................................................................... 559 uniq .................................................................................................................. 560 unshar ............................................................................................................... 560 updatedb ........................................................................................................... 561 uptime .............................................................................................................. 562 userlist ............................................................................................................... 563 uucp .................................................................................................................. 563 uuencode .......................................................................................................... 565 uustat ................................................................................................................ 566 uux.................................................................................................................... 569 uuxqt ................................................................................................................ 572 w....................................................................................................................... 573 wall ................................................................................................................... 574 wc ..................................................................................................................... 574 whereis .............................................................................................................. 575 write.................................................................................................................. 576 x11perf.............................................................................................................. 577 x11perfcomp ..................................................................................................... 585 xargs.................................................................................................................. 586 xauth ................................................................................................................. 587

  Linux Complete Command Reference xiv xdm .................................................................................................................. 599 xdpyinfo ............................................................................................................ 614 Xf86_Accel ....................................................................................................... 614

  XF86_Mono ..................................................................................................... 624

  XF86_SVGA .................................................................................................... 627

  XF86_VGA16 .................................................................................................. 631 xf86config ......................................................................................................... 633 xfd .................................................................................................................... 633

  XFree86 ............................................................................................................ 636 xfs ..................................................................................................................... 641 xhost ................................................................................................................. 643 xieperf ............................................................................................................... 645 ximtoppm ......................................................................................................... 654 xinetd................................................................................................................ 655 xinit .................................................................................................................. 664 xkill ................................................................................................................... 666 xlogo ................................................................................................................. 667 xlsatoms ............................................................................................................ 668 xlsclients............................................................................................................ 669 xlsfonts.............................................................................................................. 670 xmag ................................................................................................................. 671 xmkmf .............................................................................................................. 672 xmodmap .......................................................................................................... 672 xon .................................................................................................................... 676 xpmtoppm ........................................................................................................ 677 xprop ................................................................................................................ 677 xrdb .................................................................................................................. 681 xrefresh ............................................................................................................. 684 Xserver .............................................................................................................. 685 xset .................................................................................................................... 690 xsetroot ............................................................................................................. 693 xsm ................................................................................................................... 694 xsmclient ........................................................................................................... 698 xstdcmap ........................................................................................................... 699 xterm ................................................................................................................ 700 Xvfb .................................................................................................................. 717 xvidtune ............................................................................................................ 719 xvminitoppm .................................................................................................... 720 xwd ................................................................................................................... 721

  Introduction xv yuvtoppm ......................................................................................................... 731 zcmp, zdiff ........................................................................................................ 731 zeisstopnm ........................................................................................................ 732 zforce ................................................................................................................ 732 zgrep ................................................................................................................. 733 zmore ................................................................................................................ 733 znew.................................................................................................................. 734

  Part