Home > Store

UNIX User's Handbook, 2nd Edition

Register your product to gain access to bonus material or receive a coupon.

UNIX User's Handbook, 2nd Edition

Book

  • Sorry, this book is no longer in print.
Not for Sale

About

Features

  • NEW - Enhanced organization for easier access to information—And even more examples than the best-selling First Edition.
    • Helps students find what they're looking for more quickly—and understand it more quickly. Ex.___

  • Coverage applicable to every leading version of UNIX and Linux—Designed to serve the needs of any UNIX user -- whether they are working with Linux, Solaris, HP-UX, AIX, or any other leading platform.
    • Will remain valuable to students even if they work with multiple platforms; for example, will support the UNIX platform they use in coursework while also supporting the Linux system they may use at home. Ex.___

  • The most detailed UNIX/Windows interoperability coverage ever found in a UNIX reference—Covers every leading approach for integrating UNIX and Windows systems, including application access via X Window; NFS; Advanced Server for UNIX; POSIX compatibility; SFU; and Samba file/print sharing.
    • Helps users/students choose and implement the most effective approach to UNIX/Windows interoperability for any environment they may encounter. Ex.___

  • "Getting Started" chapter for UNIX/Linux beginners—Introduces the essential fundamentals every UNIX/Linux user needs to become effective quickly.
    • Helps readers jumpstart their UNIX/Linux skills, rapidly understanding crucial concepts that may be unfamiliar to them—while offering a useful refresher to those with at least some UNIX/Linux experience. Ex.___

  • Practical techniques for system administration and performance analysis—Covers processes, startup and shutdown, filesystems, managing disk usage, backups, kernels, device files, software management, printing, and key sysadmin commands.
    • Gives readers foundational skills for managing and optimizing any UNIX/Linux system. Ex.___

  • Detailed coverage of key UNIX utilities—Includes example-rich coverage of the vi editor, grep, awk, sed, and other key utilities.
    • Gives users hands-on help with the UNIX utilities that matter most—and provides practical pattern-matching techniques with a broad range of applications. Ex.___

  • Introductions to all three leading UNIX shells—Includes practical chapters introducing the Bash, Korn, and C shells.
    • No matter which UNIX shell users use, they have authoritative reference information to rely upon. Ex.___

Description

  • Copyright 2002
  • Edition: 2nd
  • Book
  • ISBN-10: 0-13-065419-1
  • ISBN-13: 978-0-13-065419-9

The in-depth UNIX guide for every end-user: completely updated and full of examples!

  • For every key UNIX platform: practical examples, real depth!
  • Covers all basic UNIX commands, plus sed, grep, awk, vi, and more
  • Complete shell programming coverage—plus NEW programming section covering C/C++, Java(tm), and Internet development
  • KornShell, Bash, C Shell, and Shell Programming
  • Windows interoperability, in depth: Samba, NFS, Windows 2000 Services for UNIX, and much more

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 I brings together thorough coverage of virtually every key aspect of day-to-day UNIX operation and end-user administration. Part II presents an in-depth programming reference. Part III covers every leading option for Windows interoperability. You'll find fast, easy answers for all this and more:

  • Getting started: login, mail, Internet access, and key UNIX file management commands
  • All basic UNIX commands and a complete UNIX file system overview (cd, cp, file, ls, mv, pwd, rm, rmdir, cut, paste, split, sort, diff, and more)
  • Key UNIX tools—including in-depth coverage of find, vi, find, grep, sed, and awk
  • Shells and shell programming: Bash, Korn, and C
  • Full programming section—including a NEW user-centered introduction to C/C++ and Java
  • End-user administration: processes, startup, shutdown, users/groups, backup, software management, printing, and more
  • Networking and Internet protocols
  • UNIX/Windows interoperability: Samba, X Window, NFS, Posix, Windows 2000 Services for UNIX, and other alternatives
  • Performance and monitoring

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!

Sample Content

Table of Contents



Foreword.


Preface.

A Word about the UNIX Variants Used throughout This Book. Relevant URLs. Manual Pages Included in This Book. Conventions Used in the Book.



Acknowledgments.

UNIX SECTION.

1. Getting Started—Login, Mail, Internet Access, UNIX Components.

Introduction. Multi-User UNIX. Uppercase and Lowercase Letters. Login Process. Online Manual Pages. Electronic Mail. Accessing the Internet. UNIX Components.

2. UNIX File System Introduction—File System Layout, file and ls Commands.

The Basics of UNIX. File Types. ext Files. Data Files. Source Code File. Executable Files. Shell Programs. Links. Device Files. The file Command. The ls Command. File System Layout. Linux File System Layout. Manual Pages for Some Commands Used in Chapter 2.

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.

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.

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.

6. Advanced UNIX Tools—Regular Expressions, sed, awk, and grep.

Three Commands. egular Expression Words-of-Caution. Expressions Are Strings and Wildcards. sed. awk. grep. Manual Pages for Some Commands Used in Chapter 6.

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. find.

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. vi.

9. Introduction to the Bash Shell.

Different Shells. Introduction to Bash. Issuing Commands. Initializing the History List in .bashrc. Recalling from the History List. Editing on the Command Line. Aliases in .bashrc. Command and Path Completion. File Name Expansion. Redirection (I/O Redirection). Environment Variables. Background Jobs and Job Control. umask and Permissions.

10. Introduction to the KornShell.

Different Shells. Introduction to KornShell. Startup Files. The History File, .sh_history. Recalling from the History List. Re-executing Commands with r. Fetching Commands Using vi Directives. Editing on the Command Line Using vi Directives. Aliases in KornShell. Command and Path Completion. File Name Expansion. Redirection (I/O Redirection). Environment Variables. Background Jobs and Job Control. umask and Permissions. Change File Permissions with chmod. Manual Pages of Some Commands Used in Chapter 10.

11. Introduction to the C Shell.

Different Shells. Introduction to the C Shell. Issuing Commands. The .cshrc File. The .login File. Initialize History List in .cshrc. Command-Line History. Re-Executing Commands from the History List. Aliases in .cshrc. File-Name Expansion. Redirection (I/O Redirection). Shell and Environment Variables. Background Jobs and Job Control. umask and Permissions. Change File Permissions with chmod. Manual Pages of Some Commands Used in Chapter 11. csh.

12. Introduction to Shell Programming.

Shell Programming. Steps to Create Shell Programs. ksh Programming. C Shell Programming. Manual Pages for Some Commands Used in Chapter 12.

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. Assigning Users to 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. Graphical-Based Management Tools. Manual Pages of Some Commands Used in Chapter 13.

14. Introduction to UNIX Performance Tools.

Introduction. Standard UNIX Commands. I/O and CPU Statistics with iostat. Virtual Memory Statistics with vmstat. Network Statistics with netstat. Check Processes with ps. Killing a Process. Signals. Show Remote Mounts with showmount. Show System Swap. sar: The System Activity Reporter. timex to Analyze a Command. More Advanced and Graphical Performance Tools. HP GlancePlus/UX. Using VantagePoint Performance Agent to Identify Bottlenecks. HP VantagePoint Performance Agent and HP VantagePoint Performance Analyzer/UX. Manual Pages of Some Commands Used in Chapter 14.

15. Common Desktop Environment.

Why a Graphical User Interface (GUI)? CDE Basics. Customizing CDE. CDE—Advanced Topics. The X Window System. Motif. CDE. X, Motif, and CDE Configuration Files. How Configuration Files Play Together. Specifying Appearance and Behavior. The Sequence of Events When CDE Starts. CDE and Performance. Conclusion.

16. Networking.

UNIX Networking. An Overview of IEEE802.3, TCP/IP. Internet Protocol (IP) Addressing. Using Networking. ARPA Services (Communication with Different OS). Berkeley Commands (Communication among UNIX Systems). Host Name Mapping. Network File System (NFS). Other Networking Commands and Setup. Manual Pages of Some Commands Used in Chapter 16.

PROGRAMMING SECTION.

17. Introduction to Software Development.

Introduction. Understanding Computer Programs. Compiled vs. Interpreted Languages.

18. Programming Constructs.

Introduction. Assignment Constructs. Mathematical Operators. Comparison Expressions. Loop Constructs. Choice Constructs. If…then…else Statement. Nested if…then…else Statement. Case Statement. Data Structures.

19. Programming Design.

Introduction. A Practical Example. The Next Step: Object-Oriented Method and Design. Extendibility. Reusability. Reliability. Procedural Paradigm. Object-Oriented Paradigm. Encapsulation. Inheritance. Polymorphism. How to Design for Object-Oriented Languages.

20. Development.

Introduction. Development Life Cycle. Analysis Phase. Development Phase. Test Phase. SCCS—Source Code Control System. SCCS Revision Versioning. SCCS Commands. Manual Pages of Some Commands Used in Chapter 20.

21. Introduction to C and C++.

Introduction. C and C++—The History. C and C++—Compilers. Compiling Programs. C and C++—Make Utility. C and C++—Debugging. Manual Pages of Some Commands Used in Chapter 21.

22. C Programming Basics.

Introduction. Format of a C Program. Good Programming Practices. C Language Nuts and Bolts. Standard Library. Constants. Symbolic Constants. Escape Sequences. Data Types. Integer. Floating Point. Double Precision. Exponential Notation. Character. Void. Arithmetic Expressions. Increment and Decrement Operators. Assignment Operators. Type Conversion. Precedence. Looping. Break Statement. Continue Statement. Logical Operators. Nested Loops. Choice. The if Statement. Logical Operators. The switch Statement. Functions. Arrays. Strings. Structures. Pointers. More Data Types. Storage Classes. Typedef. Enumerations. Dynamic Memory Allocation.

23. C++ Programming Basics.

Introduction. C++ Basics. Enhancements. New Features of C++.

24. Internet Programming Basics.

Introduction. Internet Basics. History. Client-Server Model of the Internet. Protocols. Web Browsers.

25. Java.

Introduction. Architecture Independence. The Java Platform. Java vs. C and C++. Java Environment. Name Space. No Preprocessor. Constants. No Macros. No Include Files. Data Types. 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.

26. Perl: An Introduction.

Programs. Search and Replace. List Operators. Subroutines.

UNIX AND WINDOWS INTEROPERABILITY SECTION.

27. The X Window System.

X Window System Background. X Server Software.

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.

29. Advanced Server for UNIX.

Windows Functionality on UNIX. Installing Advanced Server/9000 on UNIX. Sharing a Printer. Sharing a File System.

30. The Windows Command Line: NET Commands, POSIX Utilities, and Others.

Introduction for UNIX System Administrators. The Windows Command Line. NET Commands. POSIX Utilities. Additional Commands. Networking Commands. Permissions with cacls. Command-Line Backup.

31. Services for UNIX (SFU).

Introduction to SFU. Using the Network File System Functionality of SFU. Telnet Client. Telnet Server. UNIX Utilities. NFS Server. Password Synchronization.

32. Samba.

Samba Overview. Setup. Using Shares. Additional Samba Topics. Samba Web Configuration Tool (SWAT). Log Files. File Name Mangling. User Issues. Samba Utilities and Programs. Obtaining Samba.

Index.

Preface

Preface

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:

UNIX Section

  • Chapter 1: Getting Started
  • Chapter 2: UNIX File System Introduction - File System Layout, file and ls Commands
  • 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

Programming Section

  • 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

UNIX and Windows Interoperability Section

  • 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.

A Word about the UNIX Variants Used throughout This Book

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.

Relevant URLs

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

Manual Pages Included in This Book

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 hope that you enjoy reading the book and learning the material as much as I did writing it.

Marty Poniatowski
marty_poniatowski@hp.com

Updates

Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.