| Title and Copyright Information |
| About This Manual |
| Audience |
| New and Changed Features |
| Organization |
| Related Documentation |
| Reader's Comments |
| Conventions |
| 1 | Getting Started |
| 1.1 | Logging In |
| 1.1.1 | Login Restrictions |
| 1.2 | Logging Out |
| 1.3 | Using Commands |
| 1.4 | Stopping Command Execution |
| 1.5 | Setting Your Password |
| 1.5.1 | Password Aging |
| 1.5.2 | Password Guidelines |
| 1.5.3 | Choosing Passwords |
| 1.5.3.1 | Selecting a System-Generated Password |
| 1.5.3.2 | Selecting Your Own Password |
| 1.5.4 | Password Procedures |
| 1.6 | Getting Help |
| 1.6.1 | Displaying and Printing Online Reference Pages (man) |
| 1.6.2 | Locating Commands Using Descriptive Keywords |
| 2 | Overview of Files and Directories |
| 2.1 | Overview of Text Editors |
| 2.2 | Creating Sample Files with the vi Text Editor |
| 2.3 | Understanding Files, Directories and Pathnames |
| 2.3.1 | Files and File Names |
| 2.3.2 | Directories and Subdirectories |
| 2.3.3 | Displaying the Name of Your Current (Working) Directory (pwd) |
| 2.3.4 | The Tree-Structure File System and Pathnames |
| 2.4 | Specifying Files with Pattern Matching |
| 3 | Managing Files |
| 3.1 | Listing Files (ls) |
| 3.1.1 | Listing Contents of the Current Directory |
| 3.1.2 | Listing Contents of Other Directories |
| 3.1.3 | Flags Used with the ls Command |
| 3.2 | Displaying Files |
| 3.2.1 | Displaying Files Without Formatting (pg, more, cat) |
| 3.2.2 | Displaying Files with Formatting (pr) |
| 3.3 | Printing Files (lpr, lpq, lprm) |
| 3.4 | Linking Files (ln) |
| 3.4.1 | Hard Links and Soft Links |
| 3.4.2 | Links and File Systems |
| 3.4.3 | Using Links |
| 3.4.4 | How Links Work - Understanding File Names and File Serial Numbers |
| 3.4.5 | Removing Links |
| 3.5 | Copying Files (cp) |
| 3.5.1 | Copying Files in the Current Directory |
| 3.5.2 | Copying Files into Other Directories |
| 3.6 | Renaming or Moving Files (mv) |
| 3.6.1 | Renaming Files |
| 3.6.2 | Moving Files into a Different Directory |
| 3.7 | Comparing Files (diff) |
| 3.8 | Sorting File Contents (sort) |
| 3.9 | Removing Files (rm) |
| 3.9.1 | Removing a Single File |
| 3.9.2 | Removing Multiple Files - Matching Patterns |
| 3.10 | Determining File Type (file) |
| 4 | Managing Directories |
| 4.1 | Creating a Directory (mkdir) |
| 4.2 | Changing Directories (cd) |
| 4.2.1 | Changing Your Current Directory |
| 4.2.2 | Using Relative Pathname Notation |
| 4.2.3 | Accessing Directories Through Symbolic Links |
| 4.3 | Displaying Directories (ls -F) |
| 4.4 | Copying Directories (cp) |
| 4.5 | Renaming Directories (mv) |
| 4.6 | Removing Directories (rmdir) |
| 4.6.1 | Removing Empty Directories |
| 4.6.2 | Removing Multiple Directories |
| 4.6.3 | Removing Your Current Directory |
| 4.6.4 | Removing Files and Directories Simultaneously (rm -r) |
| 5 | Controlling Access to Your Files and Directories |
| 5.1 | Understanding Password and Group Security Files |
| 5.1.1 | The /etc/passwd File |
| 5.1.2 | The /etc/group File |
| 5.2 | Protecting Files and Directories |
| 5.3 | Displaying File and Directory Permissions (ls) |
| 5.4 | Setting File and Directory Permissions (chmod) |
| 5.4.1 | Specifying Permissions with Letters and Operation Symbols |
| 5.4.1.1 | Changing File Permissions |
| 5.4.1.2 | Changing Directory Permissions |
| 5.4.1.3 | Using Pattern-Matching Characters |
| 5.4.1.4 | Setting Absolute Permissions |
| 5.4.2 | Specifying Permissions with Octal Numbers |
| 5.5 | Setting Default Permissions with the User Mask |
| 5.5.1 | Setting the umask |
| 5.6 | Changing Your Identity to Access Files |
| 5.7 | Superuser Concepts |
| 5.8 | Changing Owners and Groups (chown and chgrp) |
| 5.9 | Additional Security Considerations |
| 6 | Using Processes |
| 6.1 | Understanding Programs and Processes |
| 6.2 | Understanding Standard Input, Output and Error |
| 6.2.1 | Redirecting Input and Output |
| 6.2.1.1 | Reading Input from a File |
| 6.2.1.2 | Redirecting Output |
| 6.2.2 | Redirecting Standard Error to a File |
| 6.2.2.1 | Bourne, Korn and POSIX Shell Error Redirection |
| 6.2.2.2 | C Shell Error Redirection |
| 6.2.3 | Redirecting Both Standard Error and Standard Output |
| 6.3 | Running Several Processes Simultaneously |
| 6.3.1 | Running Foreground Processes |
| 6.3.2 | Running Background Processes |
| 6.4 | Monitoring and Terminating Processes |
| 6.4.1 | Checking Process Status |
| 6.4.1.1 | The ps Command |
| 6.4.1.2 | The jobs Command |
| 6.4.2 | Canceling a Foreground Process (Ctrl/C) |
| 6.4.3 | Canceling a Background Process (kill) |
| 6.4.4 | Suspending and Resuming a Foreground Process (C Shell Only) |
| 6.5 | Displaying Information About Users and Their Processes |
| 7 | Shell Overview |
| 7.1 | Purpose of Shells |
| 7.2 | Summary of C, Bourne, Korn and POSIX Shell Features |
| 7.2.1 | More Information on C and Korn or POSIX Shell Features |
| 7.2.2 | The Restricted Bourne Shell |
| 7.3 | Changing Your Shell |
| 7.3.1 | Determining What Shell You Are Running |
| 7.3.2 | Temporarily Changing Your Shell |
| 7.3.3 | Permanently Changing Your Shell |
| 7.4 | Command Entry Aids |
| 7.4.1 | Using Multiple Commands and Command Lists |
| 7.4.1.1 | Running Commands in Sequence with a Semicolon (;) |
| 7.4.1.2 | Running Commands Conditionally |
| 7.4.2 | Using Pipes and Filters |
| 7.4.3 | Grouping Commands |
| 7.4.3.1 | Using Parentheses ( ) |
| 7.4.3.2 | Using Braces { } |
| 7.4.4 | Quoting |
| 7.4.4.1 | Using the Backslash ( |
| 7.4.4.2 | Using Single Quotes (' ') |
| 7.4.4.3 | Using Double Quotes (" ") |
| 7.5 | The Shell Environment |
| 7.5.1 | The login Program |
| 7.5.2 | Environment Variables |
| 7.5.3 | Shell Variables |
| 7.6 | Login Scripts and Your Environment |
| 7.7 | Using Variables |
| 7.7.1 | Setting Variables |
| 7.7.1.1 | Bourne, Korn and Posix Shell Variables |
| 7.7.1.2 | C Shell Variables |
| 7.7.1.3 | Setting Variables in All Shells |
| 7.7.2 | Referencing Variables (Parameter Substitution) |
| 7.7.3 | Displaying the Values of Variables |
| 7.7.4 | Clearing the Values of Variables |
| 7.8 | How the Shell Finds Commands |
| 7.9 | Using Logout Scripts |
| 7.9.1 | Logout Scripts and the Shell |
| 7.9.2 | A Sample .logout File |
| 7.10 | Using Shell Procedures (Scripts) |
| 7.10.1 | Writing and Running Shell Procedures |
| 7.10.2 | Specifying a Run Shell |
| 8 | Shell Features |
| 8.1 | Comparison of C, Bourne, Korn and POSIX Shell Features |
| 8.2 | C Shell Features |
| 8.2.1 | Sample .cshrc and .login Scripts |
| 8.2.2 | Metacharacters |
| 8.2.3 | Command History |
| 8.2.4 | File Name Completion |
| 8.2.5 | Aliases |
| 8.2.6 | Built-In Variables |
| 8.2.7 | Built-In Commands |
| 8.3 | Bourne Shell Features |
| 8.3.1 | Sample .profile Login Script |
| 8.3.2 | Metacharacters |
| 8.3.3 | Built-In Variables |
| 8.3.4 | Built-In Commands |
| 8.4 | Korn or POSIX Shell Features |
| 8.4.1 | Sample .profile and .kshrc Login Scripts |
| 8.4.2 | Metacharacters |
| 8.4.3 | Command History |
| 8.4.4 | Command Line Editing Using the fc Command |
| 8.4.4.1 | Examples of Command Line Editing |
| 8.4.5 | File Name Completion |
| 8.4.6 | Aliases |
| 8.4.7 | Built-In Variables |
| 8.4.8 | Built-In Commands |
| 9 | Using the System V Habitat |
| 9.1 | Setting Up Your Environment |
| 9.2 | How the System V Habitat Access Works |
| 9.3 | Compatibility for Shell Scripts |
| 9.4 | System V Habitat Command Summary |
| 10 | Obtaining Information About Network Users and Hosts |
| 10.1 | Identifying Users on the Local Host |
| 10.2 | Obtaining Information About Network Users |
| 10.2.1 | Obtaining Information About a Specific User |
| 10.2.2 | Obtaining Information About Users on a Remote Host |
| 10.2.3 | Obtaining Information About an Individual User on a Remote Host |
| 10.2.4 | Customizing Output from the finger Command |
| 10.3 | Obtaining Information About Remote Hosts and Users |
| 10.4 | Obtaining Information About Users on Remote Hosts |
| 10.5 | Determining Whether a Remote Host Is On Line |
| 11 | Sending and Receiving Messages |
| 11.1 | Addressing Mail Messages |
| 11.2 | Sending a Mail Message Using mailx |
| 11.2.1 | Editing a Message |
| 11.2.2 | Aborting a Message |
| 11.2.2.1 | Aborting a Message with Ctrl/C |
| 11.2.2.2 | Aborting a Message with an Escape Command |
| 11.2.3 | Including a File Within a Message |
| 11.3 | Receiving a Mail Message |
| 11.3.1 | Deleting a Message |
| 11.3.2 | Replying to a Message |
| 11.3.3 | Saving a Message |
| 11.3.3.1 | Saving a Message in a File |
| 11.3.3.2 | Saving a Message in a Folder |
| 11.3.4 | Forwarding a Message |
| 11.4 | Getting Help from mailx |
| 11.5 | Exiting Mail |
| 11.6 | Customizing Mail Sessions |
| 11.6.1 | Creating Mail Aliases |
| 11.6.2 | Setting Mail Variables |
| 11.7 | The Message Handling (MH) Program |
| 11.8 | Sending and Receiving Messages with write |
| 11.9 | Sending and Receiving Messages with talk |
| 12 | Copying Files to Another Host |
| 12.1 | Copying Files Between a Local and a Remote Host |
| 12.1.1 | Using rcp to Copy Files Between Local and Remote Hosts |
| 12.1.2 | Using ftp to Copy Files Between Local and Remote Hosts |
| 12.1.3 | Using mailx to Copy ASCII Files Between Local and Remote Hosts |
| 12.1.4 | Using write to Copy Files Between Local and Remote Hosts |
| 12.2 | Copying Directories of Files Between a Local and a Remote Host |
| 12.3 | Copying Files Between Two Remote Hosts |
| 13 | Working on a Remote Host |
| 13.1 | Using rlogin to Log in to a Remote Host |
| 13.2 | Using rsh to Run Commands on a Remote Host |
| 13.3 | Using telnet to Log in to a Remote Host |
| 14 | The UUCP Networking Commands |
| 14.1 | UUCP Pathname Conventions |
| 14.2 | Finding Hosts that Support UUCP |
| 14.3 | Connecting to a Remote Host |
| 14.3.1 | Using cu to Connect to a Remote Host |
| 14.3.1.1 | Using cu to Connect by Name to a Remote Host |
| 14.3.1.2 | Using cu to Specify a Directly-Connected Remote Host |
| 14.3.1.3 | Using cu to Connect by Telephone to a Remote Host |
| 14.3.1.4 | Local cu Commands |
| 14.3.1.5 | Using cu to Connect a Local Host to Several Remote Hosts |
| 14.3.2 | Using tip to Connect to a Remote Host |
| 14.3.2.1 | Using tip to Connect by Name to a Remote Host |
| 14.3.2.2 | Using tip to Connect by Telephone to a Remote Host |
| 14.3.2.3 | Local tip Commands |
| 14.3.2.4 | Using tip to Connect a Local Host to Several Remote Hosts |
| 14.3.3 | Using ct to Connect to a Remote Terminal with a Modem |
| 14.4 | Using uux to Run Commands on Remote Hosts |
| 14.4.1 | Using uux from the Bourne, Korn or POSIX Shells |
| 14.4.2 | Using uux from the C Shell |
| 14.4.3 | Other uux Features and Suggestions |
| 14.5 | Using UUCP to Send and Receive Files |
| 14.5.1 | Using UUCP to Copy Files in the Bourne, Korn and POSIX Shells |
| 14.5.2 | Using UUCP to Copy Files in the C Shell |
| 14.6 | Using uuto with uupick to Copy Files |
| 14.7 | Using uuto to Send a File Locally |
| 14.8 | Displaying Job Status of UUCP Utilities |
| 14.8.1 | The uustat Command |
| 14.8.1.1 | Displaying the Holding Queue Output with a uustat Option |
| 14.8.1.2 | Displaying the Current Queue Output with uustat Options |
| 14.8.2 | Using the uulog Command to Display UUCP Log Files |
| 14.8.3 | Monitoring UUCP Status |
| A | A Beginner's Guide to Using vi |
| A.1 | Getting Started |
| A.1.1 | Creating a File |
| A.1.2 | Opening an Existing File |
| A.1.3 | Saving a File and Quitting vi |
| A.1.4 | Moving Within a File |
| A.1.4.1 | Moving the Cursor Up, Down, Left and Right |
| A.1.4.2 | Moving the Cursor by Word, Line, Sentence and Paragraph |
| A.1.4.3 | Moving and Scrolling the Cursor Forward and Backward Through a File |
| A.1.4.4 | Movement Command Summary |
| A.1.5 | Entering New Text |
| A.1.6 | Editing Text |
| A.1.6.1 | Deleting Words |
| A.1.6.2 | Deleting Lines |
| A.1.6.3 | Changing Text |
| A.1.6.4 | Text Editing Command Summary |
| A.1.7 | Undoing a Command |
| A.1.8 | Finishing Your Edit Session |
| A.2 | Using Advanced Techniques |
| A.2.1 | Searching for Strings |
| A.2.2 | Deleting and Moving Text |
| A.2.3 | Yanking and Moving Text |
| A.2.4 | Other vi Features |
| A.3 | Using the Underlying ex Commands |
| A.3.1 | Making Substitutions |
| A.3.2 | Writing a Whole File or Parts of a File |
| A.3.3 | Deleting a Block of Text |
| A.3.4 | Customizing Your Environment |
| A.3.5 | Saving Your Customizations |
| B | Creating and Editing Files with ed |
| B.1 | Understanding Text Files and the Edit Buffer |
| B.2 | Creating and Saving Text Files |
| B.2.1 | Starting the ed Program |
| B.2.2 | Entering Text - The a (append) Subcommand |
| B.2.3 | Displaying Text - The p (print) Subcommand |
| B.2.4 | Saving Text - The w (write) Subcommand |
| B.2.4.1 | Saving Text Under the Same File Name |
| B.2.4.2 | Saving Text Under a Different File Name |
| B.2.4.3 | Saving Part of a File |
| B.2.5 | Leaving the ed Program - The q (quit) Subcommand |
| B.3 | Loading Files into the Edit Buffer |
| B.3.1 | Using the ed (edit) Command |
| B.3.2 | Using the e (edit) Subcommand |
| B.3.3 | Using the r (read) Subcommand |
| B.4 | Displaying and Changing the Current Line |
| B.4.1 | Finding Your Position in the Buffer |
| B.4.2 | Changing Your Position in the Buffer |
| B.5 | Locating Text |
| B.5.1 | Searching Forward Through the Buffer |
| B.5.2 | Searching Backward Through the Buffer |
| B.5.3 | Changing the Direction of a Search |
| B.6 | Making Substitutions - The s (substitute) Subcommand |
| B.6.1 | Substituting on the Current Line |
| B.6.2 | Substituting on a Specific Line |
| B.6.3 | Substituting on Multiple Lines |
| B.6.4 | Changing Every Occurrence of a String |
| B.6.5 | Removing Characters |
| B.6.6 | Substituting at Line Beginnings and Ends |
| B.6.7 | Using a Context Search |
| B.7 | Deleting Lines - The d (delete) Subcommand |
| B.7.1 | Deleting the Current Line |
| B.7.2 | Deleting a Specific Line |
| B.7.3 | Deleting Multiple Lines |
| B.8 | Moving Text - The m (move) Subcommand |
| B.9 | Changing Lines of Text - The c (change) Subcommand |
| B.9.1 | Changing a Single Line of Text |
| B.9.2 | Changing Multiple Lines of Text |
| B.10 | Inserting Text - The i (insert) Subcommand |
| B.10.1 | Using Line Numbers |
| B.10.2 | Using a Context Search |
| B.11 | Copying Lines - The t (transfer) Subcommand |
| B.12 | Using System Commands from ed |
| B.13 | Ending the ed Program |
| C | Using Internationalization Features |
| C.1 | Understanding Locale |
| C.2 | How Locale Affects Processing and Display of Data |
| C.2.1 | Collation |
| C.2.2 | Date and Time Formats |
| C.2.3 | Numeric and Monetary Formats |
| C.2.4 | Messages |
| C.2.5 | Yes/No Prompts |
| C.3 | Determining Whether a Locale Has Been Set |
| C.4 | Setting a Locale |
| C.4.1 | Locale Categories |
| C.4.2 | Limitations of Locale Settings |
| C.4.2.1 | Locale Settings Are Not Validated |
| C.4.2.2 | File Data Is Not Bound to a Locale |
| C.4.2.3 | Setting LC_ALL Overrides All Other Locale Variables |
| D | Customizing Your mailx Session |
| E | Using Escape Commands in Your mailx Session |
| F | Using the mailx Commands |
| G | Access Control Lists (ACLs) |
| G.1 | ACL Structure |
| G.2 | Access Checking with ACLs |
| G.3 | ACL Inheritance |
| G.3.1 | ACL Inheritance Examples |
| G.4 | Managing ACLs |
| G.4.1 | Using the dxsetacl Interface |
| G.4.2 | Using the getacl Command |
| G.4.3 | Using the setacl Command |
| G.5 | ACL Interaction with Commands and Applications |
| G.5.1 | The pax and tar Commands |
| Examples |
| 1-1 | Typical Login Screen |
| 1-2 | Reference Page for date Command |
| 3-1 | Long (ls -l) Directory Listing |
| 3-2 | Output from the pg Command (One File) |
| 3-3 | Output from the pg Command (Multiple Files) |
| 3-4 | Using the lpr Command |
| 3-5 | Linking Files |
| 5-1 | Setting Absolute Permissions |
| 5-2 | Removing Absolute Permissions |
| 5-3 | Using the su Command |
| 6-1 | Output from the ps Command |
| 6-2 | Output from the who Command |
| 6-3 | Output from the who -u Command |
| 6-4 | Output from the w Command |
| 6-5 | Output from the ps au Command |
| 8-1 | Sample ksh history Output |
| 11-1 | Including the dead.letter File |
| 11-2 | Including a File with the mailx Command |
| 11-3 | Entering the mailx Environment |
| 11-4 | Reading a mailx Message |
| 11-5 | Reading Another mailx Message |
| 11-6 | Replying to a Message |
| 11-7 | Forwarding a Message |
| 11-8 | Output from mailx Help Command |
| 11-9 | Sample .mailrc File |
| 12-1 | Using ftp to Copy a File |
| 13-1 | Using the telnet Command |
| D-1 | The mailx verbose Mode |
| G-1 | Displaying the ACL for a File |
| G-2 | Setting the ACL for a File |
| Figures |
| 1-1 | Shell Interaction with the User and the Operating System |
| 2-1 | A Typical File System |
| 2-2 | Relative and Full Pathnames |
| 3-1 | Removing Links and Files |
| 4-1 | Relationship Between Directories and Subdirectories |
| 4-2 | Copying a Directory Tree |
| 5-1 | File and Directory Permission Fields |
| 7-1 | Flow Through a Pipeline |
| 9-1 | System V Habitat |
| Tables |
| 2-1 | Pattern-matching Characters |
| 2-2 | Internationalized Pattern-matching Characters |
| 3-1 | The ls Command Flags |
| 3-2 | The pr Command Flags |
| 3-3 | The lpr Command Flags |
| 5-1 | Differences Between File and Directory Permissions |
| 5-2 | Permission Combinations |
| 5-3 | How Octal Numbers Relate to Permission Fields |
| 5-4 | The umask Permission Combinations |
| 6-1 | Shell Notation for Reading Input and Redirecting Output |
| 7-1 | Shell Names and Default Prompts |
| 7-2 | Multiple Command Operators |
| 7-3 | Command Grouping Symbols |
| 7-4 | Shell Quoting Conventions |
| 7-5 | Selected Shell Environment Variables |
| 7-6 | System and Local Login Scripts |
| 7-7 | Description of Example Shell Script |
| 8-1 | C, Bourne, Korn and POSIX Shell Features |
| 8-2 | Example .cshrc Script |
| 8-3 | Example .login Script |
| 8-4 | C Shell Metacharacters |
| 8-5 | Reexecuting History Buffer Commands |
| 8-6 | C Shell Built-In Variables |
| 8-7 | Built-In C Shell Commands |
| 8-8 | Example Bourne Shell .profile Script |
| 8-9 | Bourne Shell Metacharacters |
| 8-10 | Bourne Shell Built-In Variables |
| 8-11 | Bourne Shell Built-In Commands |
| 8-12 | Example Korn or POSIX Shell .profile Script |
| 8-13 | Example .kshrc Script |
| 8-14 | Korn or POSIX Shell Metacharacters |
| 8-15 | Reexecuting History Buffer Commands |
| 8-16 | Built-In Korn or POSIX Shell Variables |
| 8-17 | Korn or POSIX Shell Built-In Commands |
| 9-1 | User Commands Summary |
| 10-1 | Options to the finger Command |
| 10-2 | Options to the ruptime Command |
| 11-1 | Commands for the MH Message-Handling Program |
| 12-1 | The ftp Subcommands for Connecting to a Host and Copying Files |
| 12-2 | The ftp Subcommands for Directory and File Modification |
| 12-3 | The ftp Subcommands for Help and Status Information |
| 13-1 | The telnet Subcommands |
| 14-1 | Options to the cu Command |
| 14-2 | Local cu Commands |
| 14-3 | Options to the tip Command |
| 14-4 | Local tip Commands |
| 14-5 | Options to the ct Command |
| 14-6 | Options to the uux Command |
| 14-7 | Options to the UUCP Command |
| 14-8 | Options to the uupick Command |
| 14-9 | Options to the uuto Command |
| 14-10 | Options to the uustat Command |
| 14-11 | Options to the uulog Command |
| A-1 | Write and Quit Command Summary |
| A-2 | Cursor Movement Command Summary |
| A-3 | Text Insertion Command Summary |
| A-4 | Text Editing Command Summary |
| A-5 | Selected vi Environment Variables |
| C-1 | Locale Names |
| C-2 | Environment Variables That Influence Locale Functions |
| D-1 | Variables for Customizing Your mailx Session |
| E-1 | Escape Commands in mailx |
| F-1 | Commands for the mailx Program |
| G-1 | Example ACL Entries |
| Index |