|
UNIX end-users desperately need an up-to-date reference guide with real depth: one that teaches UNIX commands and doesn't just list them! In UNIX User's Handbook, second edition, best-selling UNIX author Marty Poniatowski covers every topic UNIX users need to master-with exceptional clarity and practical, real-world examples. Part 1 brings togther thorough coverage of virtually every key aspect of day-to-day UNIX operation and end-user administration. Part 2 presents an in-depth programming reference. Part 3 covers every leading option for Windows interoperability. This new edition has been updated throughout and redesigned for even faster, easier access to information. Whatever your experience, whatever UNIX version you use, you won't find a more useful reference! 777 |
Copyright | |||||||||||||||||
FOREWORD | |||||||||||||||||
PREFACE | |||||||||||||||||
UNIX Section | |||||||||||||||||
Programming Section | |||||||||||||||||
UNIX and Windows Interoperability Section | |||||||||||||||||
A Word about the UNIX Variants Used throughout This Book | |||||||||||||||||
Relevant URLs | |||||||||||||||||
Manual Pages Included in This Book | |||||||||||||||||
Conventions Used in the Book | |||||||||||||||||
Acknowledgments | |||||||||||||||||
Chapter 1. Getting Started - Login, Mail, Internet Access, UNIX Components | |||||||||||||||||
Introduction | |||||||||||||||||
Multi-User UNIX | |||||||||||||||||
Online Manual Pages | |||||||||||||||||
Electronic Mail | |||||||||||||||||
Accessing the Internet | |||||||||||||||||
UNIX Components | |||||||||||||||||
Chapter 2. UNIX File System Introduction- File System Layout, file and ls Commands | |||||||||||||||||
The Basics of UNIX | |||||||||||||||||
File Types | |||||||||||||||||
The file Command | |||||||||||||||||
The ls Command | |||||||||||||||||
File System Layout | |||||||||||||||||
Linux File System Layout | |||||||||||||||||
Manual Pages for Some Commands Used in Chapter 2 | |||||||||||||||||
Chapter 3. Working with Files and Directories - Permissions, Commands, File Name Expansion, and Wild Cards | |||||||||||||||||
Introduction | |||||||||||||||||
Permissions | |||||||||||||||||
Absolute and Relative Path Names | |||||||||||||||||
File Name Expansion and Wild Cards | |||||||||||||||||
pwd and cd | |||||||||||||||||
chmod | |||||||||||||||||
cp | |||||||||||||||||
mv | |||||||||||||||||
mkdir | |||||||||||||||||
rm | |||||||||||||||||
rmdir | |||||||||||||||||
Using Commands | |||||||||||||||||
Manual Pages for Some Commands Used in Chapter 3 | |||||||||||||||||
Chapter 4. Viewing Files - Redirection, cat, more, pg, head, and tail Commands | |||||||||||||||||
First Things First | |||||||||||||||||
Redirection | |||||||||||||||||
Viewing Files with cat, more, pg, head, and tail | |||||||||||||||||
Manual Pages for Some Commands Used in Chapter 4 | |||||||||||||||||
Chapter 5. UNIX Tools - split, wc, sort, cmp, diff, comm, dircmp, cut, paste, join, and tr | |||||||||||||||||
Not All Commands on All UNIX Variants | |||||||||||||||||
split | |||||||||||||||||
wc | |||||||||||||||||
sort | |||||||||||||||||
cmp, diff, and comm | |||||||||||||||||
dircmp | |||||||||||||||||
cut | |||||||||||||||||
paste | |||||||||||||||||
tr | |||||||||||||||||
Manual Pages for Some Commands Used in Chapter 5 | |||||||||||||||||
Chapter 6. Advanced UNIX Tools - Regular Expressions, sed, awk, and grep | |||||||||||||||||
Three Commands | |||||||||||||||||
Regular Expression Words-of-Caution | |||||||||||||||||
Expressions Are Strings and Wildcards | |||||||||||||||||
sed | |||||||||||||||||
awk | |||||||||||||||||
grep | |||||||||||||||||
Manual Pages for Some Commands Used in Chapter 6 | |||||||||||||||||
Chapter 7. find Command | |||||||||||||||||
find Overview | |||||||||||||||||
Finding Files of a Specific Type | |||||||||||||||||
Find Empty Files and Directories | |||||||||||||||||
Finding Files By Name, Size, and Both Name and Size | |||||||||||||||||
Finding Files By Owner, Type, and Permissions | |||||||||||||||||
Finding Long Unaccessed Files and Running Commands on Found Files | |||||||||||||||||
find Summary | |||||||||||||||||
Manual Pages for find Command Used in Chapter 7 | |||||||||||||||||
Chapter 8. The vi Editor | |||||||||||||||||
The vi Editor | |||||||||||||||||
Regular Expression Words-of-Caution | |||||||||||||||||
Expressions Are Strings and Wildcards | |||||||||||||||||
Modes and Notations | |||||||||||||||||
Starting a vi Session | |||||||||||||||||
Cursor Control Commands | |||||||||||||||||
Adding Text in vi | |||||||||||||||||
Deleting Text in vi | |||||||||||||||||
Changing Text in vi | |||||||||||||||||
Search and Replace in vi | |||||||||||||||||
Copying Text in vi | |||||||||||||||||
Undo and Repeat in vi | |||||||||||||||||
Save Text and Exit vi | |||||||||||||||||
Options in vi | |||||||||||||||||
Status in vi | |||||||||||||||||
Section Positioning and Placing Marks in Text | |||||||||||||||||
Joining Lines in vi | |||||||||||||||||
Cursor Placement and Adjusting the Screen | |||||||||||||||||
Shell Escape Commands | |||||||||||||||||
Macros and Abbreviations | |||||||||||||||||
Indenting Text | |||||||||||||||||
Shell Filters | |||||||||||||||||
Pattern Matching | |||||||||||||||||
Manual Pages for vi Command Used in Chapter 8 | |||||||||||||||||
Chapter 9. Introduction to the Bash Shell | |||||||||||||||||
Different Shells | |||||||||||||||||
Introduction to Bash | |||||||||||||||||
Chapter 10. Introduction to the KornShell | |||||||||||||||||
Different Shells | |||||||||||||||||
Introduction to KornShell | |||||||||||||||||
Manual Pages of Some Commands Used in Chapter 10 | |||||||||||||||||
Chapter 11. Introduction to the C Shell | |||||||||||||||||
Different Shells | |||||||||||||||||
Introduction to the C Shell | |||||||||||||||||
Manual Pages of Some Commands Used in Chapter 11 | |||||||||||||||||
Chapter 12. Introduction to Shell Programming | |||||||||||||||||
Shell Programming | |||||||||||||||||
Steps to Create Shell Programs | |||||||||||||||||
ksh Programming | |||||||||||||||||
An HP-UX Logical Volume Manager Shell Program | |||||||||||||||||
C Shell Programming | |||||||||||||||||
Manual Pages for Some Commands Used in Chapter 12 | |||||||||||||||||
Chapter 13. Introduction to System Administration | |||||||||||||||||
System Administration | |||||||||||||||||
Check Processes with ps | |||||||||||||||||
Killing a Process | |||||||||||||||||
Signals | |||||||||||||||||
System Startup and Shutdown Scripts | |||||||||||||||||
An Alternative Startup and Shutdown Method | |||||||||||||||||
System Shutdown | |||||||||||||||||
Users and Groups | |||||||||||||||||
Disk-Related Concepts | |||||||||||||||||
Viewing Mounted Filesystems and Swap | |||||||||||||||||
Determining Disk Usage | |||||||||||||||||
System Backup | |||||||||||||||||
Scheduling Cron Jobs | |||||||||||||||||
Networking | |||||||||||||||||
syslog and Log Files | |||||||||||||||||
dmesg | |||||||||||||||||
The Kernel | |||||||||||||||||
Device Files | |||||||||||||||||
Software Management | |||||||||||||||||
Printing | |||||||||||||||||
Manual Pages of Some Commands Used in Chapter 13 | |||||||||||||||||
Chapter 14. Introduction to UNIX Performance Tools | |||||||||||||||||
Introduction | |||||||||||||||||
Standard UNIX Commands | |||||||||||||||||
Check Processes with ps | |||||||||||||||||
Killing a Process | |||||||||||||||||
Signals | |||||||||||||||||
More Advanced and Graphical Performance Tools | |||||||||||||||||
HP GlancePlus/UX | |||||||||||||||||
HP VantagePoint Performance Agent and HP VantagePoint Performance Analyzer/UX | |||||||||||||||||
Manual Pages of Some Commands Used in Chapter 14 | |||||||||||||||||
Chapter 15. Common Desktop Environment | |||||||||||||||||
Why a Graphical User Interface (GUI)? | |||||||||||||||||
CDE Basics | |||||||||||||||||
Customizing CDE | |||||||||||||||||
CDE - Advanced Topics | |||||||||||||||||
X, Motif, and CDE Configuration Files | |||||||||||||||||
The Sequence of Events When CDE Starts | |||||||||||||||||
CDE and Performance | |||||||||||||||||
Conclusion | |||||||||||||||||
Chapter 16. Networking | |||||||||||||||||
UNIX Networking | |||||||||||||||||
An Overview of IEEE802.3, TCP/IP | |||||||||||||||||
Internet Protocol (IP) Addressing | |||||||||||||||||
Using Networking | |||||||||||||||||
ARPA Services (Communication among Systems w/ Different OS) | |||||||||||||||||
Berkeley Commands (Communication between UNIX Systems) | |||||||||||||||||
Host Name Mapping | |||||||||||||||||
Network File System (NFS) | |||||||||||||||||
Other Networking Commands and Setup | |||||||||||||||||
Manual Pages of Some Commands Used in Chapter 16 | |||||||||||||||||
netstat | |||||||||||||||||
Chapter 17. Introduction to Software Development | |||||||||||||||||
Introduction | |||||||||||||||||
Understanding Computer Programs | |||||||||||||||||
Compiled vs. Interpreted Languages | |||||||||||||||||
Chapter 18. Programming Constructs | |||||||||||||||||
Introduction | |||||||||||||||||
Assignment Constructs | |||||||||||||||||
Mathematical Operators | |||||||||||||||||
Comparison Expressions | |||||||||||||||||
Loop Constructs | |||||||||||||||||
Choice Constructs | |||||||||||||||||
Nested if...then...else Statement | |||||||||||||||||
Chapter 19. Programming Design | |||||||||||||||||
Introduction | |||||||||||||||||
A Practical Example | |||||||||||||||||
The Next Step: Object-Oriented Method and Design | |||||||||||||||||
Procedural Paradigm | |||||||||||||||||
Object-Oriented Paradigm | |||||||||||||||||
Encapsulation | |||||||||||||||||
Inheritance | |||||||||||||||||
Polymorphism | |||||||||||||||||
How to Design for Object-Oriented Languages | |||||||||||||||||
Chapter 20. Development | |||||||||||||||||
Introduction | |||||||||||||||||
Development Life Cycle | |||||||||||||||||
SCCS - Source Code Control System | |||||||||||||||||
SCCS Commands | |||||||||||||||||
Manual Pages of Some Commands Used in Chapter 20 | |||||||||||||||||
Chapter 21. Introduction to C and C++ | |||||||||||||||||
Introduction | |||||||||||||||||
C andC++ - The History | |||||||||||||||||
C and C++ - Compilers | |||||||||||||||||
C and C++ - Make Utility | |||||||||||||||||
C and C++ - Debugging | |||||||||||||||||
Manual Pages of Some Commands Used in Chapter 21 | |||||||||||||||||
Chapter 22. C Programming Basics | |||||||||||||||||
Introduction | |||||||||||||||||
Format of a C Program | |||||||||||||||||
Good Programming Practices | |||||||||||||||||
Uppercase and Lowercase | |||||||||||||||||
C Language Nuts and Bolts | |||||||||||||||||
Arithmetic Expressions | |||||||||||||||||
Looping | |||||||||||||||||
Choice | |||||||||||||||||
Functions | |||||||||||||||||
Arrays | |||||||||||||||||
Strings | |||||||||||||||||
Structures | |||||||||||||||||
Pointers | |||||||||||||||||
More Data Types | |||||||||||||||||
Dynamic Memory Allocation | |||||||||||||||||
Chapter 23. C++ Programming Basics | |||||||||||||||||
Introduction | |||||||||||||||||
C++ Basics | |||||||||||||||||
Enhancements | |||||||||||||||||
New Features of C++ | |||||||||||||||||
Chapter 24. Internet Programming Basics | |||||||||||||||||
Introduction | |||||||||||||||||
Internet Basics | |||||||||||||||||
History | |||||||||||||||||
Client-Server Model of the Internet | |||||||||||||||||
Protocols | |||||||||||||||||
Web Browsers | |||||||||||||||||
Chapter 25. Java | |||||||||||||||||
Introduction | |||||||||||||||||
Architecture Independence | |||||||||||||||||
The Java Platform | |||||||||||||||||
Java vs. C and C++ | |||||||||||||||||
Java Environment | |||||||||||||||||
Comments | |||||||||||||||||
No Preprocessor | |||||||||||||||||
Constants | |||||||||||||||||
No Macros | |||||||||||||||||
No Include Files | |||||||||||||||||
Data Types | |||||||||||||||||
Integral Types | |||||||||||||||||
Reference Data Types | |||||||||||||||||
Modifiers | |||||||||||||||||
No Pointers | |||||||||||||||||
Null | |||||||||||||||||
No Structure or Unions | |||||||||||||||||
No Enumerated Types | |||||||||||||||||
No Typedef | |||||||||||||||||
Object Creation | |||||||||||||||||
Accessing Objects | |||||||||||||||||
Garbage Collection | |||||||||||||||||
Arrays | |||||||||||||||||
Strings | |||||||||||||||||
The for Loop | |||||||||||||||||
Exception and Exception Handling | |||||||||||||||||
Applets | |||||||||||||||||
Chapter 26. Perl: An Introduction | |||||||||||||||||
Practical Extraction and Reporting Language | |||||||||||||||||
Perl Options | |||||||||||||||||
Opening Input and Output Files, File Test Operators, and Escape Squences | |||||||||||||||||
Variables - Scalar and Array | |||||||||||||||||
Conditional Statements and Loops, Operators, and Autoincrement and Autodecrement | |||||||||||||||||
Arguments to Shell Programs | |||||||||||||||||
Search and Replace | |||||||||||||||||
List Operators | |||||||||||||||||
Subroutines | |||||||||||||||||
Chapter 27. The X Window System | |||||||||||||||||
X Window System Background | |||||||||||||||||
X Server Software | |||||||||||||||||
Chapter 28. Networking - UNIX and Windows Interoperability | |||||||||||||||||
NFS and X Windows | |||||||||||||||||
TCP/IP Networking Background | |||||||||||||||||
NFS Background | |||||||||||||||||
Using Windows and UNIX Networking | |||||||||||||||||
File Transfer Protocol (FTP) | |||||||||||||||||
Other Connection Topics | |||||||||||||||||
Chapter 29. Advanced Server for UNIX | |||||||||||||||||
Windows Functionality on UNIX | |||||||||||||||||
Installing Advanced Server/9000 on UNIX | |||||||||||||||||
Sharing a Printer | |||||||||||||||||
Sharing a File System | |||||||||||||||||
Chapter 30. The Windows Command Line: NET Commands, POSIX Utilities, and Others | |||||||||||||||||
Introduction for UNIX System Administrators | |||||||||||||||||
The Windows Command Line | |||||||||||||||||
NET Commands | |||||||||||||||||
wc | |||||||||||||||||
Additional Commands | |||||||||||||||||
Chapter 31. Services for UNIX (SFU) | |||||||||||||||||
Introduction to SFU | |||||||||||||||||
Using the Network File System (NFS) Functionality of SFU | |||||||||||||||||
Telnet Client | |||||||||||||||||
Telnet Server | |||||||||||||||||
UNIX Utilities | |||||||||||||||||
NFS Server | |||||||||||||||||
Password Synchronization | |||||||||||||||||
Chapter 32. Samba | |||||||||||||||||
Samba Overview | |||||||||||||||||
Additional Samba Topics |
Library of Congress Cataloging-in-Publication Data
A CIP catalogue record for this book can be obtained from the Library of Congress.
Editorial/production supervision: Patti Guerrieri
Cover design director: Jerry Votta
Cover design: Talar Boorujy
Manufacturing manager: Maura Zaldivar
Acquisitions editor: Jill Harry
Editorial assistant: Justin Somma
Marketing manager: Dan DePasquale
Publisher and Manager, HP Books: Pat Pekary
Marketing Manager, HP Books: Susan Wright
2002 by Hewlett-Packard Company
Published by Prentice Hall PTR
Prentice-Hall, Inc.
Upper Saddle River, New Jersey 07458
Prentice Hall books are widely used by corporations and government agencies for training, marketing, and resale.
The publisher offers discounts on this book when ordered in bulk quantities. For more information, contact Corporate Sales Department, Phone: 800-382-3419; FAX: 201-236-7141;
E-mail: corpsales@prenhall.com
Or write: Prentice Hall PTR, Corporate Sales Dept., One Lake Street, Upper Saddle River, NJ 07458.
All products or company names mentioned herein are the trademarks or registered trademarks of their respective owners.
All rights reserved. No part of this book may be reproduced, in any form or by any means, without permission in writing from the publisher.
Printed in the United States of America
10 9 8 7 6 5 4 3 2 1
Pearson Education LTD.
Pearson Education Australia PTY, Limited
Pearson Education Singapore, Pte. Ltd.
Pearson Education North Asia Ltd.
Pearson Education Canada, Ltd.
Pearson Educaci n de Mexico, S.A. de C.V.
Pearson Education Japan
Pearson Education Malaysia, Pte. Ltd.
UNIX has evolved from its rather inconspicuous beginnings in a research and development environment to immense popularity in the Internet community. It is always amazing to step back and realize how much something has changed. Fortunately, in computing, this doesn't take long. The Unix operating system progressed from R&D through uses within select major industries to the Internet. Today's UNIX options for a computer system include a wide range of products, from utilizing a UNIX command set on non-UNIX systems, through various Linux distributions, to the different variants of UNIX, including HP-UX, Solaris, and AIX. UNIX can be found not only in traditional dedicated computer room settings, but also desktops, notebooks, and PDAs. Understanding the processes and procedures of the UNIX operating system has never been more important or necessary. Whether you are an administrator or user, beginning or experienced, the concepts and implementations of UNIX and Linux systems have become essential knowledge in today's computer-oriented world.
Many books, software, and advertisements refer to a "basic knowledge" of UNIX without defining it. Because it is always easier to relate to a known quantity (also called "the bird in the hand is worth two in the bush" theory), here is my definition of basic UNIX knowledge. A user with a fundamental understanding of UNIX should know: the structure of UNIX, how to log in and log off, the commands required to move from one directory to another (and back again), an editor, some shell commands, Internet basics, an electronic mail program, the principles of shell scripting, and a little C. However, because a little knowledge is like eating one potato chip, most readers and users find that reading and learning more about UNIX are not only an accomplishment, but also an enjoyable experience.
Coupled with the necessity for knowledge is the demand for documentation. Some documentation unfortunately resembles the User's Guide to your VCR. It tells you something, but you aren't quite sure what. A good computer book can be easily identified. It not only illustrates the concepts you are trying to learn, but also furnishes the ideas and information you'll want in six months. An excellent book can also be used as a reference guide as you learn. The UNIX User's Handbook demonstrates the requisite structure of the UNIX operating system and its accompanying commands. It also details three shell environments, the vi editor, data manipulation tools, a thorough chapter on Common Desktop Environment (CDE), and an elaborate Software Development chapter. It surveys issues related to administration, development, and performance through examples employing several UNIX variants, including Linux. For easy reference, many chapters conclude with the manual pages for commands introduced within that chapter. A vi reference card is also provided as an additional quickly accessed resource. A new addition is a chapter introducing Perl fundamentals. This is a book that can be an aid to both the beginning and the experienced user and administrator.
The UNIX User's Handbook provides the reader with the opportunity to learn UNIX from an experienced UNIX professional and an excellent author. I have read (and reviewed) most of Marty Poniatowski's books. He has a flair for making complex procedures completely understandable, especially for the beginner. When I review a book, I look for logical organization, content, readability, examples, and enthusiasm. There is no substitute for enthusiasm; it is thankfully contagious. An author's enthusiasm can inspire readers to unexpected achievements. All authors try to write the book they wish had existed when they were beginning. Mr. Poniatowski succeeds.
Elizabeth Zinkann
Contributing Editor and Review Columnist for Sys Admin Magazine.
Since its inception, UNIX has been viewed as requiring a certain amount of "magic" to understand it. Nothing could be further from the truth. Like all operating systems , most UNIX commands are simple and easy to use. There are also powerful UNIX commands, to which every user has access, that you will find indispensable once you master them.
That proficiency is, in fact, what I wish to accomplish in this book. Cover all UNIX commands and tools that a new UNIX user needs to know in order to become quickly proficient with UNIX, going from the beginner level of UNIX proficiency to the intermediate level.
Since this is Revision 2 of the book, I have made many improvements based on reader feedback. There were several thousand copies of the original book sold and hundreds of readers supplied me feedback. One common suggestion was to expand the programming chapter into a programming section. Many new UNIX users are starting out with programming as well, so I took this suggestion and made a separate programming section.
I could never tell you everything you need to know about UNIX in just one book. I do, however, cover every essential command and tool to get you started quickly with UNIX. If you take a few seconds to look at the upcoming table of contents, I think that you'll see that I've included every essential UNIX topic to help you gain an understanding of UNIX.
You may very well find that you'll need additional resources as your UNIX knowledge grows. All top UNIX suppliers offer training courses in a variety of forms. In addition, the manuals of the top UNIX suppliers are extensive and cover many topics in great depth. And, of course, there are many reference books available as well. This book should be your first reference for learning UNIX but by no means your only reference.
You won't find any fluff in this book. Most of the UNIX topics covered in this book are essential information for every UNIX user. This book is full of background and examples. The book is heavy on examples because I believe that the easiest way to learn any computer-science-related topic is through examples.
UNIX User's Handbook is comprised of the following three sections and their associated chapters:
Chapter 1: Getting Started
Chapter 2: UNIX File System Introduction - File System Layout, file and ls 2
Chapter 3: Working with Files and Directories - Permissions, Commands, File Name Expansion, and Wild Cards
Chapter 4: Viewing Files - Redirection, cat, more, pg, head, and tail Commands
Chapter 5: UNIX Tools - split, wc, sort, cmp, diff, comm, dircmp, cut, paste, join, and tr
Chapter 6: Advanced UNIX Tools - Regular Expressions, sed, awk, and grep
Chapter 7: find Command
Chapter 8: The vi Editor
Chapter 9: Introduction to the Bash Shell
Chapter 10: Introduction to the KornShell
Chapter 11: Introduction to the C Shell
Chapter 12: Introduction to Shell Programming
Chapter 13: Introduction to System Administration
Chapter 14: Introduction to Performance Analysis
Chapter 15: Common Desktop Environment (CDE)
Chapter 16: Networking
Chapter 17: Introduction to Software Development
Chapter 18: Programming Constructs
Chapter 19: Programming Design
Chapter 20: Development
Chapter 21: Introduction to C and C++
Chapter 22: C Programming Basics
Chapter 23: C++ Programming Basics
Chapter 24: Internet Programming Basics
Chapter 25: Java
Chapter 26: Perl: An Introduction
Chapter 27: The X Window System
Chapter 28: Network File System
Chapter 29: Advanced Server for UNIX
Chapter 30: POSIX Commands
Chapter 31: Services for UNIX (SFU)
Chapter 32: Samba
Covered in these chapters is everything you need to get started and work through advanced topics in UNIX system administration.
I do not advocate the use of one UNIX variant over another. Don't think, for instance, that because there are many Linux examples in this book I am advocating the use of Linux over other UNIX variants. Linux and a handful of other UNIX variants are used throughout the examples in this book because they are among the most popular UNIX variants and I had easy access to such systems. In fact, there are two different Linux implementations used in the book - Red Hat and Caldera. Not only am I not advocating one UNIX variant over another, but I am also not advocating any Linux implementation over another. I have no intention of swaying you one way or another when it comes to which UNIX variant to use. My only objective is to help you get started with whatever UNIX variant you are using as quickly as possible.
I use a wide variety of UNIX variants in the examples throughout the book. I don't get hung up highlighting the differences in UNIX variants. Rather, I focus on the common denominator of UNIX functionality that you can use. Most UNIX variants are very similar indeed, so what you'll find is that the vast majority of commands used throughout this book are very similar, going from one UNIX variant to another.
Only occasionally throughout the book do I provide an example using many different UNIX variants. Most examples use only one operating system. The uses of many commands, however, are sufficiently different that the outputs, options, locations of commands, or some other feature would be different among UNIX variants. This statement is especially true of system administration-related commands, which is the area where UNIX variants differ the most. The concepts are the same, but the location of files, their options, and the format may differ. As long as you know this fact going from one UNIX variant to another, you'll be ready to change your thinking just enough to get you through the possible variations in commands.
I don't cover any UNIX background or try to position UNIX variants. UNIX has now become mainstream and to try to position one UNIX variant relative to another and to try keeping up with the many advanced UNIX features being introduced on a regular basis would be futile.
There are many Web sites that can assist you in your HP-UX system administration endeavors. I have listed some of the more prominent HP-UX-related Web sites below as they existed at the time of this writing:
News on many technical topics of interest: http://www.slashdot.com
Information on Linux: http://www.linux.com, www.linuxworld.com (and others)
Comparison of commands, files, directories, and so on on several UNIX variants: http://www.unixguide.net
In-depth information on security: http://www.sans.org
Information on Perl, including sites to download Perl: http://www.perl.com
The Perl Journal: http://www.tpj.com
Register name servers at: http://www.icann.org/registrars/accredited-list.html.
Software used for UNIX and Windows interoperability at: http://www.hummingbird.com/products/evals/index.html
Specific site for your UNIX variant such as: http://www.hp.com for HP-UX, http://www.sun.com for Solaris ...
UNIX information at: http://www.unixreview.com
UNIX system administration information at: http://www.sysadminmag.com
Information about the GNOME desktop environment: http://www.gnome.org
Public domain software that has been ported to HP-UX: http://hpux.connect.org.uk
Site devoted to managing and promoting open source: http://www.opensource.org
Linux documentation site: http://www.linuxdoc.org
I am most grateful to Hewlett-Packard Company for having allowed me to include select HP-UX manual pages in this book. Although specific options for a given command often differ among the UNIX variants, to have a manual page to turn to when reviewing a command is useful. I included the manual pages for select commands where I thought they would be especially helpful. My special thanks to Ram Appalaraju, Michael Nixon, and Susan Wright of Hewlett-Packard for having taken a lead role in helping me receive permission for using the manual pages.
Although the manual pages are for HP-UX, you may find that having a manual page in the same chapter where a command is covered is a great reference. Most UNIX commands are similar going from variant to another in that they provide the same output information or use the same options, so the HP-UX manual pages provide a good starting point for researching a given command.
When a command used for an online manual page is in the book, the following information appears in the margin:
This is a "man page" block, which includes the man page icon and the command name, in this case, ps, and the chapter number in which the online manual page appears, in this case Chapter 12.
The Table of Contents contains a complete list of the man pages appearing at the end of each chapter. The man pages for a command appear in the chapter to which the command is most applicable, even if it is not the first chapter in which the command is used. Commands pertaining to performance, for instance, have their man pages in the performance chapter, even if those commands were used in an earlier chapter.
I don't use a lot of complex notations in the book. Here are a few simple conventions I've used to make the examples clear and the text easy to follow:
$ and # | The UNIX command prompt. Every command issued in the book is preceded by one of these prompts. |
italics | Italics is used primarily when referencing selections that have been made in one of the examples or specifying options to commands. |
bold and " " | Bold text is the information you would type, such as the command you issue after a prompt or the information you type when running a script. Sometimes information you would type is also referred to in the text explaining it, and the typed information may then appear in quotation marks. |
<--- | When selections have to be made, this indicates the one chosen for the purposes of the example. |
One additional convention is that used for command formats. I don't use command formats any more than I have to because I could never do as thorough a job describing commands as the UNIX manual pages. The manual pages go into detail on all UNIX commands. Here is the format I use when I cover commands:
form 1 command [option(s)] [arg(s)] form 2 command [option(s)] [arg(s)] form n command [option(s)] [arg(s)]
I try not to get carried away with detail when covering a command, but, sometimes many components must be covered in order for you to understand a command. Here is a brief description of the components listed above:
form # Sometimes many forms of a command exist. If there is more than one form of a command that requires explanation, then I will show more than one form.
command The name of the executable.
option(s) Several options may appear across a command line.
cmd_arg(s) Command arguments such as path name.
Too many people were involved in helping me with this book to list them all. I have decided to formally thank those who wrote sections of the book and those who took time to review it. I'm still not sure whether it takes more time to write something or review something that has been written to ensure that it is correct.
Bill is Vice President & General Manager of the Software and Solutions Organization for Hewlett-Packard. Bill acted as executive champion and sponsor of this book. His support was invaluable in helping to get the resources necessary to complete this book.
Elizabeth wrote the Foreword for this book. She is a Contributing Editor and Review Columnist for Sys Admin Magazine, The Journal for UNIX System Administrators. Her articles have also appeared in Performance Computing, Linux Magazine, and Network Administrator. As an independent computer consultant, she has built Linux servers, maintained computers utilizing Linux, Solaris, Macintosh, and Windows environments, programmed databases, and taught UNIX, shell programming, and Internet essentials. Elizabeth is also a freenlance technical editor specializing in Linux and Open Source books. In a former life, she also programmed communications features for both domestic and International databases at AT&T Network Systems.
Donna wrote the " Common Desktop Environment (CDE) " chapter of this book. Donna and I have collaborated on a number of projects. Donna has painstakingly reviewed many of my books for both technical accuracy and readability. Donna is both a technical expert in many operating systems and an excellent evaluator of the usefulness of a topic and the way it is covered. She not only ensures that the material is technically accurate, but she also makes certain that each topic is covered in a useful manner and that it is easy to read and comprehend.
Donna has been responsible for a number of computing environments of Hewlett-Packard in Roseville, CA. She has experience with several operating systems, including HP-UX, MPE, and AS/400. Donna also is a Microsoft Certified Systems Engineer (MCSE).
Carollyn wrote most of the chapters in the "Programming Section." Carollyn is a Technical Consultant at Hewlett-Packard, specializing in E-Services, Internet Solutions, and Software Languages. Carollyn was previously employed at AT&T/AT&T Bell Labs for ten years as a software developer and analyst, working on a network optimization system and telecommunication pricing applications.
Thom generously supplied access to many of the UNIX systems used to write this book. He also performed special setup on many systems so that effective examples could be produced. Thom reviewed many sections of the book. His experience with many UNIX variants and desire to help were an invaluable resource to me when writing this book.
Thom is a technical consultant retained by HP in Roseville, CA at the time of this writing. He provides technical and educational services on a variety of UNIX platforms, including AIX, Solaris, SunOS, HP-UX, and NCR. He also provides Internet and intranet solution help, such as extensive shell scripting, perl programming, cgi, Web server implementation, and various security solutions, including SSL and firewalls. Thom can be reached at thom@vintagebus.com
Marty has been a Senior Technical Specialist with Hewlett-Packard for 14 years in the New York area. He has worked with hundreds of Hewlett-Packard customers in many industries including, on-line services, financial, and manufacturing.
Marty has been widely published in computer industry trade publications. He has published over 50 articles on various computer-related topics. In addition to this book, he is the author of nine other Prentice Hall books: HP-UX 11i System Administration Handbook and Toolkit (2001); HP-UX 11.x System Administration Handbook and Toolkit (1999); HP-UX 11.x System Administrator's "How To" Book (1998); HP NetServer Guide for Windows NT (1998); HP-UX System Administration Handbook and Toolkit (1997); Windows NT and HP-UX System Administrator's "How To" Book (1997); Learning the HP-UX Operating System (1996); HP-UX 10.x System Administrator's "How To" Book (1995); and The HP-UX System Administrator's "How To" Book (1993).
Marty holds an M.S. in Information Systems from Polytechnic University (Brooklyn, NY), an M.S. in Management Engineering from the University of Bridgeport (Bridgeport, CT), and a B.S. in Electrical Engineering from Roger Williams University (Bristol, RI).
I'm not sure what makes someone agree to review a book. You don't get the glory of a contributing author, but the amount of work is just the same. I would like to thank the many people who devoted a substantial amount of time to reviewing this book to ensure that I included the topics important to new UNIX users and covered those topics accurately.
This book covers many different UNIX variants and topics. I developed a sense of the power and importance of the UNIX industry when working with so many UNIX variants. Virtually every company seems to use UNIX, which turns out to be a good thing when asking experts to review various sections. Roughly a total of 25 UNIX experts reviewed various sections of the book. I would like to thank all reviewers and give special thanks to some of them in this section.
Those who devoted time to reviewing many chapters of the book are: Richard Martino, Manager of UNIX Systems, Estee Lauder Companies; George Fiederlein, Manager of Systems Administration, Barnes and Noble, Inc.; Ayelet Senator, Senior Systems Administrator, Barnes and Noble, Inc.; Tom Broccoletti, Director of Systems Technology, GabRobins North America, Inc., and Jack Kern, Instructor, The Allied Group, Inc.
I hope that you enjoy reading the book and learning the material as much as I did writing it.
Marty Poniatowski
marty_poniatowski@hp.com