|
DataMuseum.dkPresents historical artifacts from the history of: CP/M |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about CP/M Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 226688 (0x37580) Types: RcTekst Names: »42-I2516.WP«
└─⟦481be0aa0⟧ Bits:30008870 Diskette med 42-I og 44-RT dokumenter └─⟦this⟧ »42-I2516.WP«
╱0400274e0c0006000000000301483160000000000000000000000000000000000000000000000000050a0f14191e23282d32373c41464bff04╱ ┆06┆i↲ ↲ ┆a1┆┆b0┆CONTENTS┆05┆PAGE↲ ↲ 0. INTRODUCTION ................................................... 0-1↲ ↲ 1. DOCUMENTATION ROADMAP .......................................... 1-1↲ ↲ 2. SYSTEM OVERVIEW ................................................ 2-1↲ ╞ 2.1 Hardware .................................................. 2-1↲ ╞ 2.2 Optional Hardware ......................................... 2-2↲ ╞ 2.3 Terminals ................................................. 2-2↲ ╞ 2.4 Software .................................................. 2-3↲ ╞ 2.5 Optional Software ......................................... 2-4↲ ╞ 2.6 System Administrator ...................................... 2-4↲ ╞ 2.7 Some System Examples ...................................... 2-5↲ ↲ 3. HARDWARE INSTALLATION .......................................... 3-1↲ ╞ 3.1 Selection of Installation Site ............................ 3-1↲ ╞ 3.2 Connections ............................................... 3-7↲ ╞ 3.3 System Examples ........................................... 3-9↲ ↲ 4. XENIX AND UNIPLEX INSTALLATION ................................. 4-1↲ ╞ 4.1 Installation of XENIX ..................................... 4-1↲ ╞ ╞ 4.1.1 Distribution Format ................................ 4-1↲ ╞ ╞ 4.1.2 Installing the Distribution ........................ 4-1↲ ╞ 4.2 Installation of UNIPLEX ................................... 4-6↲ ↲ 5. CONFIGURATION .................................................. 5-1↲ ╞ 5.1 Configuration of the ITC .................................. 5-1↲ ╞ 5.2 Terminal Support .......................................... 5-3↲ ↲ 6. SYSTEM ADMINISTRATOR ........................................... 6-1↲ ╞ 6.1 Introduction .............................................. 6-1↲ ╞ ╞ 6.1.1 The Role of the System Manager ..................... 6-2↲ ╞ ╞ 6.1.2 The XENIX System ................................... 6-2↲ ╞ ╞ 6.1.3 Hard Disk vs. Floppy-Only Systems .................. 6-3↲ ╞ ╞ 6.1.4 Outline of This Chapter ............................ 6-3↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆06┆ii↲ ↲ ╞ 6.2 A First Look at XENIX ..................................... 6-5↲ ╞ ╞ 6.2.1 A Word about Your XENIX System ..................... 6-5↲ ╞ ╞ 6.2.2 Some Preliminaries ................................. 6-6↲ ╞ ╞ ╞ 6.2.2.1 Your Keyboard ............................. 6-6↲ ╞ ╞ ╞ 6.2.2.2 XENIX File and Directory .................. 6-8↲ ╞ ╞ ╞ ╞ ╞ Naming Conventions↲ ╞ ╞ ╞ 6.2.2.3 How to Use XENIX Commands ................ 6-11↲ ╞ ╞ 6.2.3 Files and Directories ..............................6-12↲ ╞ ╞ ╞ 6.2.3.1 The Hierarchy of Files and Directories ....6-13↲ ╞ ╞ ╞ 6.2.3.2 File Manipulation Commands ................6-14↲ ╞ ╞ 6.2.4 The XENIX Shell ....................................6-15↲ ╞ ╞ ╞ 6.2.4.1 Controlling Input and Output ..............6-16↲ ╞ ╞ ╞ 6.2.4.2 Redirection ...............................6-16↲ ╞ ╞ ╞ 6.2.4.3 Pipes .....................................6-17↲ ╞ ╞ 6.2.5 Frequently Used Commands ...........................6-19↲ ╞ ╞ ╞ 6.2.5.1 Commands for Using Your Terminal ..........6-19↲ ╞ ╞ ╞ ╞ ╞ and Lineprinter↲ ╞ ╞ ╞ 6.2.5.2 File Manipulation Commands ................6-22↲ ╞ ╞ ╞ 6.2.5.3 Basic System Utilities ....................6-27↲ ╞ ╞ 6.2.6 Text Editing with Ed ...............................6-28↲ ╞ ╞ ╞ 6.2.6.1 Invoking the Editor .......................6-28↲ ╞ ╞ ╞ 6.2.6.2 Adding Text to a File .....................6-29↲ ╞ ╞ ╞ 6.2.6.3 Saving Your File ..........................6-29↲ ╞ ╞ ╞ 6.2.6.4 Exiting the Editor ........................6-30↲ ╞ ╞ ╞ 6.2.6.5 Printing the Contents of Your File ........6-30↲ ╞ ╞ ╞ 6.2.6.6 Deleting Text .............................6-31↲ ╞ ╞ ╞ 6.2.6.7 Substituting Text .........................6-31↲ ╞ ╞ ╞ 6.2.6.8 Searching .................................6-33↲ ╞ 6.3 Getting the System Ready for Your Users ...................6-35↲ ╞ ╞ 6.3.1 The Super-User .....................................6-35↲ ╞ ╞ 6.3.2 Adding a User: The mkuser Program ..................6-36↲ ╞ ╞ 6.3.3 The .profile File ..................................6-40↲ ╞ ╞ 6.3.4 Removing a User: The rmuser Program ................6-40↲ ╞ 6.4 controlling Access to Files and Directories ...............6-43↲ ╞ ╞ 6.4.1 Setting Permissions: users, Groups, and Others .....6-43↲ ╞ ╞ ╞ 6.4.1.1 Users .....................................6-43↲ ╞ ╞ ╞ 6.4.1.2 Groups ....................................6-44↲ ╞ ╞ ╞ 6.4.1.3 Permissions ...............................6-44↲ ╞ ╞ ╞ 6.4.1.4 How to Change Permission Settings .........6-45↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆06┆iii↲ ↲ ╞ ╞ 6.4.2 The File System ....................................6-46↲ ╞ ╞ 6.4.3 Creating File Systems ..............................6-46↲ ╞ ╞ 6.4.4 Mounted File Systems ...............................6-47↲ ╞ ╞ 6.4.5 XENIX System Security ..............................6-48↲ ╞ ╞ ╞ 6.4.5.1 Protection and Permission .................6-48↲ ╞ ╞ ╞ 6.4.5.2 Password Security .........................6-49↲ ╞ ╞ ╞ 6.4.5.3 Restating the Obvious .....................6-49↲ ╞ 6.5 Keeping Your XENIX System Healthy .........................6-51↲ ╞ ╞ 6.5.1 Processes ..........................................6-51↲ ╞ ╞ ╞ 6.5.1.1 Daemon Processes ..........................6-52↲ ╞ ╞ ╞ 6.5.1.2 The /┆a1┆etc┆e1┆/┆a1┆rc┆e1┆ File ..........................6-52↲ ╞ ╞ 6.5.2 The Importance of Disk Space .......................6-52↲ ╞ ╞ ╞ 6.5.2.1 The df command ............................6-53↲ ╞ ╞ ╞ 6.5.2.2 The du Command ............................6-54↲ ╞ ╞ ╞ 6.5.2.3 The find Command ..........................6-54↲ ╞ ╞ ╞ 6.5.2.4 The quot Command ..........................6-55↲ ╞ ╞ 6.5.3 Communicating with Other Users .....................6-55↲ ╞ ╞ 6.5.4 File System Integrity ..............................6-56↲ ╞ 6.6 Backing Up Your System ....................................6-57↲ ╞ ╞ 6.6.1 Formatting Floppy Disks ............................6-57↲ ╞ ╞ 6.6.2 Archiving and Taking Care of Your Disks ............6-57↲ ╞ ╞ 6.6.3 Using the tar Command ..............................6-58↲ ╞ ╞ 6.6.4 Dump/Restore File System ...........................6-59↲ ╞ 6.7 Common System Problems ....................................6-60↲ ╞ ╞ 6.7.1 Jammed Line Printer ................................6-60↲ ╞ ╞ 6.7.2 Forgotten Password .................................6-60↲ ╞ ╞ 6.7.3 System is Out of Space .............................6-60↲ ╞ ╞ 6.7.4 System Files Damaged ...............................6-61↲ ╞ ╞ 6.7.5 Terminal Difficulties ..............................6-61↲ ╞ ╞ 6.7.6 Forgetting the Root Password .......................6-62↲ ╞ ╞ 6.7.7 Removing a Directory ...............................6-62↲ ╞ ╞ 6.7.8 Special Characters in Filenames ....................6-62↲ ╞ ╞ 6.7.9 Runaway Processes ..................................6-63↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆06┆iv↲ ↲ ╞ 6.A XENIX Files and directories ................................6-65↲ ╞ ╞ 6.A.1 Do Not Touch .......................................6-65↲ ╞ ╞ 6.A.2 /bin ...............................................6-66↲ ╞ ╞ 6.A.3 /dev ...............................................6-66↲ ╞ ╞ 6.A.4 /etc ...............................................6-67↲ ╞ ╞ 6.A.5 /lib ...............................................6-67↲ ╞ ╞ 6.A 6 /mnt ...............................................6-67↲ ╞ ╞ 6.A.7 /tmp ...............................................6-67↲ ╞ ╞ 6.A.8 /usr ...............................................6-67↲ ╞ 6.B The Multi-User System .....................................6-69↲ ╞ ╞ 6.B.1 Shutting Down the System ...........................6-69↲ ╞ ╞ 6.B.2 Setting Up Multiple Terminals ......................6-70↲ ╞ ╞ 6.B.3 Setting User ID for Multiple Systems ...............6-71↲ ╞ 6.C Glossary ..................................................6-72↲ ↲ 7. NORMAL USE ..................................................... 7-1↲ ╞ 7.1 System Startup Procedure .................................. 7-1↲ ╞ 7.2 XENIX System Running ...................................... 7-2↲ ╞ 7.3 XENIX System Shutdown ..................................... 7-2↲ ↲ 8. RC3900 MENU SYSTEM ............................................. 8-1↲ ╞ 8.1 Word Processing System Menu ............................... 8-3↲ ╞ ╞ 8.1.1 Create a New Document .............................. 8-3↲ ╞ ╞ 8.1.2 Edit a Document .................................... 8-4↲ ╞ ╞ 8.1.3 Print a Document ................................... 8-4↲ ╞ ╞ 8.1.4 Mail Merge ......................................... 8-4↲ ╞ ╞ 8.1.5 Change Directory ................................... 8-5↲ ╞ ╞ 8.1.6 List Files ......................................... 8-5↲ ╞ ╞ 8.1.7 Index System Menu .................................. 8-5↲ ╞ ╞ ╞ 8.1.7.1 Names in This Directory Only .............. 8-5↲ ╞ ╞ ╞ 8.1.7.2 Names in This and Subdirectories .......... 8-6↲ ╞ ╞ ╞ 8.1.7.3 Names in a specified Directory ............ 8-6↲ ╞ ╞ ╞ 8.1.7.4 Names on a Particular Subject ............. 8-6↲ ╞ ╞ ╞ 8.1.7.5 find the Location of a File ............... 8-7↲ ╞ ╞ ╞ 8.1.7.6 Classify the Contents of a File ........... 8-7↲ ╞ ╞ ╞ 8.1.7.7 View the Start of a File .................. 8-7↲ ╞ ╞ ╞ 8.1.7.8 View the End of a File .................... 8-8↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆06┆v↲ ↲ ╞ ╞ 8.1.8 File Cheking Menu .................................. 8-8↲ ╞ ╞ ╞ 8.1.8.1 View Spelling Errors in a File ............ 8-8↲ ╞ ╞ ╞ 8.1.8.2 Save Spelling Errors ...................... 8-8↲ ╞ ╞ ╞ 8.1.8.3 View Spelling Errors Saved ................ 8-9↲ ╞ ╞ ╞ 8.1.8.4 Print Out Spelling Errors Saved ........... 8-9↲ ╞ ╞ ╞ 8.1.8.5 Count Lines, Words, and Characters ........ 8-9↲ ╞ ╞ ╞ 8.1.8.6 Full File Status Report ................... 8-9↲ ╞ ╞ ╞ 8.1.8.7 List Files ................................8-10↲ ╞ ╞ 8.1.9 Utilities Menu .....................................8-10↲ ╞ 8.2 Utilities Menu ............................................8-10↲ ╞ ╞ 8.2.1 Copy ...............................................8-10↲ ╞ ╞ 8.2.2 Erase ..............................................8-11↲ ╞ ╞ 8.2.3 New Name ...........................................8-11↲ ╞ ╞ 8.2.4 Open a New Directory ...............................8-12↲ ╞ ╞ 8.2.5 Remove an empty Directory ..........................8-12↲ ╞ ╞ 8.2.6 List Files ........................................ 8-12↲ ╞ ╞ 8.2.7 Time and Date ..................................... 8-12↲ ╞ ╞ 8.2.8 Monthly Calendar .................................. 8-13↲ ╞ ╞ 8.2.9 Desk Calculator ................................... 8-13↲ ╞ 8.3 Company Directory Menu ................................... 8-13↲ ╞ ╞ 8.3.1 Look Up an Entry .................................. 8-14↲ ╞ ╞ 8.3.2 Edit the Directory ................................ 8-14↲ ╞ ╞ 8.3.3 Print the Directory ............................... 8-14↲ ╞ 8.4 Electronic Mail Menu ..................................... 8-14↲ ╞ ╞ 8.4.1 Mailboxes on the System ........................... 8-15↲ ╞ ╞ 8.4.2 Send Mail to Another User ......................... 8-15↲ ╞ ╞ 8.4.3 Collect Mail ...................................... 8-15↲ ╞ ╞ 8.4.4 Who is Also on the Computer ....................... 8-16↲ ╞ ╞ 8.4.5 Talk to Another User .............................. 8-16↲ ╞ ╞ 8.4.6 Install Extended Facilities ....................... 8-16↲ ↲ ╞ 8.5 Nonstandard Facilities ................................... 8-17↲ ╞ 8.6 Function Key Differences ................................. 8-17↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆06┆vi↲ 9. ERROR HANDLING ................................................ 9-1↲ ╞ 9.1 Test Lamp Flashes or Stays Lit during Power-Up ........... 9-1↲ ╞ 9.2 Error Message during Power-Up ............................ 9-2↲ ╞ 9.3 Unusual Behavior during Normal Use ....................... 9-3↲ ↲ A. OTHER LITERATURE .............................................. A-1↲ ╞ A.1 Books on the Unix System ................................. A-1↲ ╞ A.2 Books on the C Programming Language ...................... A-1↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆┆05┆0-┆0b┆↲ ┆a1┆┆b0┆↲ ┆a1┆┆b0┆0.╞ ╞ INTRODUCTION↲ ↲ ╞ ╞ ┆84┆THE RC3900/1 MICROCOMPUTER SYSTEM from RC Computer is a high ↓ ┆19┆┆89┆┄┄performance multiuser computer system, which gives you the per-↓ ┆19┆┆89┆┄┄formance of a 16 bit microprocessor and the enormous flexibili┄↓ ┆19┆┆89┆┄┄ty of the XENIX *) operating system (a fully licensed version ↓ ┆19┆┆89┆┄┄of Bell Laboratories UNIX Version 7).↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆06┆RC3900/1↲ ↲ ┆84┆You may choose among the many utilities of the XENIX operating ↓ ┆19┆┆89┆┄┄system in a simple menu driven way, or you can use the standard ↓ ┆19┆┆89┆┄┄shell command language. The RC3900/1 system also includes the ↓ ════════════════════════════════════════════════════════════════════════ ↓ ┆19┆┆89┆┄┄powerful UNIPLEX **) word processing system. In addition RC ↓ ┆19┆┆89┆┄┄Computer can supply a broad range of optional application pack-↓ ┆19┆┆89┆┄┄ages. Of course you can connect a variety of terminals and ↓ ┆19┆┆89┆┄┄printers to the system and get high performance computing, but ↓ ┆19┆┆89┆┄┄the system is specifically optimized for the user friendly ter-↓ ┆19┆┆89┆┄┄minal RC855 and the fast matrix printer RC3991.↲ ↲ ╞ ╞ ┆84┆Congratulations on your choice of the RC3900 computer system.↲ ↲ ╞ ╞ *) XENIX is a trademark of Microsoft, Inc.↲ ╞ ╞ **) UNIPLEX is a trademark of Redwood.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆┆05┆1┆b3┆-┆0b┆↲ ┆a1┆┆b0┆1.╞ ╞ DOCUMENTATION ROADMAP↲ ↲ ╞ ╞ ┆84┆When you bought the RC3900/1 system the standard documentation ↓ ┆19┆┆89┆┄┄described below was delivered. We have indicated what we think ↓ ┆19┆┆89┆┄┄the System Administrator (SA) should concentrate on, and what ↓ ┆19┆┆89┆┄┄the Normal User (NU) should concentrate on.↲ ↲ ↲ ┆e1┆┆e1┆ 1. User's Guide, Volume 1↲ ↲ ╞ ╞ ┆84┆This is the manual you are reading right now. It describes the ↓ ┆19┆┆89┆┄┄system setup, software installation procedures, configuration ↓ ┆19┆┆89┆┄┄of the terminals etc. Also described is the normal use of the ↓ ┆19┆┆89┆┄┄system, including the standard implemented menu system. Finally ↓ ┆19┆┆89┆┄┄a short chapter on error handling is included.↲ ↲ ╞ ╞ ╞ ┆a1┆Chapter↲ ╞ ╞ ╞ 0. Introduction↲ ╞ ╞ ╞ 1. Documentation Roadmap↲ ╞ ╞ ╞ 2. System Overview↲ ╞ ╞ ╞ 3. Hardware Installation╞ (SA)↲ ╞ ╞ ╞ 4. XENIX and UNIPLEX Installation (SA)↲ ╞ ╞ ╞ 5. Configuration (SA)↲ ╞ ╞ ╞ 6. System Administrator (SA)↲ ╞ ╞ ╞ 7. Normal Use (NU)↲ ╞ ╞ ╞ 8. RC3900 Menu System (NU)↲ ╞ ╞ ╞ 9. Error Handling↲ ╞ ╞ ╞ A. Other Literature (NU)↲ ↲ ↲ ╞ ╞ 2. ┆84┆User's Guide, Volume 2, also called XENIX Fundamentals ↓ ┆19┆┆8e┆┄┄(NU)↲ ↲ ╞ ╞ ┆84┆This manual gives you a detailed introduction to the fundament-↓ ┆19┆┆89┆┄┄als of XENIX. It describes the editors in the system, that is, ↓ ┆19┆┆89┆┄┄ed, vi and sed. Also described is the Shell command interpre┄t-↓ ┆19┆┆89┆┄┄er.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ╞ ┆a1┆Chapter↲ ╞ ╞ ╞ 1. Introduction↲ ╞ ╞ ╞ 2. Demonstration Run↲ ╞ ╞ ╞ 3. Basic Concepts↲ ╞ ╞ ╞ 4. Frequently Used Procedures↲ ╞ ╞ ╞ 5. Ed↲ ╞ ╞ ╞ 6. Vi↲ ╞ ╞ ╞ 7. The Shell↲ ╞ ╞ ╞ 8. Sed↲ ╞ ╞ ╞ 9. BC: A Calculator↲ ╞ ╞ ╞ 10. An Introduction to the C Shell↲ ↲ ↲ ╞ ╞ 3. ┆84┆XENIX Programmer's Manual, Volume 1, also called the XENIX ↓ ┆19┆┆8e┆┄┄System Reference Manual↲ ↲ ╞ ╞ ┆84┆Here is the down-to-the-detail description in 8 sections of all ↓ ┆19┆┆89┆┄┄the available system calls, subroutines, special files, file ↓ ┆19┆┆89┆┄┄formats, games, macro packages and maintenance. This manual ↓ ┆19┆┆89┆┄┄should be your reference for most of the commands. Please note ↓ ┆19┆┆89┆┄┄that this manual is also available on-line on the computer, ↓ ┆19┆┆89┆┄┄using the ┆a1┆man┆e1┆ command. References to this manual have the form:↲ ↲ ╞ ╞ /etc/shutdown(8)↲ ╞ ╞ or↲ ╞ ╞ cat(1)↲ ↲ ┆84┆which means that ┆a1┆shutdown┆e1┆ is described in Chapter 8, and ┆a1┆cat┆e1┆ in ↓ ┆19┆┆89┆┄┄Chapter 1.↲ ↲ ┆81┆╞ ╞ ╞ ┆a1┆Chapter↲ ╞ ╞ ╞ 1. Commands↲ ╞ ╞ ╞ 2. System Calls↲ ╞ ╞ ╞ 3. Subroutines↲ ╞ ╞ ╞ 4. Special Files↲ ╞ ╞ ╞ 5. File Formats↲ ╞ ╞ ╞ 6. Games↲ ╞ ╞ ╞ 7. Miscellany↲ ╞ ╞ ╞ 8. Maintenance↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ 4. XENIX Programmer's Manual, Volume 2↲ ↲ ╞ ╞ ┆84┆Gives in a number of original articles and tutorials a general ↓ ┆19┆┆89┆┄┄overview of the UNIX facilities and many utilities.↲ ↲ ╞ ╞ There are articles on:↲ ╞ ╞ ╞ General works, 1-2↲ ╞ ╞ ╞ Getting started, 3-7↲ ╞ ╞ ╞ Document preparation, 8-13↲ ╞ ╞ ╞ Programming, 14-18↲ ╞ ╞ ╞ Supporting tools and languages, 19-28↲ ╞ ╞ ╞ Implementation, maintenance, and miscellaneous, 29-38↲ ↲ ↲ ╞ ╞ 5. UNIPLEX Manual↲ ↲ ╞ ╞ ┆84┆This manual explains the use of the UNIPLEX word processing ↓ ┆19┆┆89┆┄┄system, giving a detailed description of each command. It is ↓ ┆19┆┆89┆┄┄also described how to change the existing menus, if desired.↲ ↲ ↲ ┆84┆Please note that a number of utilities are described in more ↓ ┆19┆┆89┆┄┄than one place. For example, the desk calculator BC is de- ↓ ┆19┆┆89┆┄┄scribed on 20 pages in 2), 3 pages in 3) and finally 13 pages ↓ ┆19┆┆89┆┄┄in 4).↲ ↲ ↲ ╞ ╞ ┆84┆The present documentation for the RC3900/1 system is partly ↓ ┆19┆┆89┆┄┄written by RC staff and partly a reprint of text from other ↓ ┆19┆┆89┆┄┄sources. This fact may be reflected by the appearance of the ↓ ┆19┆┆89┆┄┄manuals. We hope that this will not prevent you from getting ↓ ┆19┆┆89┆┄┄the full benefit of the documentation.↲ ┆14┆┆b3┆↓ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆┆05┆2-┆0b┆↲ ↲ ┆a1┆┆b0┆2.╞ ╞ SYSTEM OVERVIEW↲ ↲ ╞ ╞ ┆84┆This chapter will give you information on the constituents of ↓ ┆19┆┆89┆┄┄the RC3900/1 computer system, both the hardware used, and the ↓ ┆19┆┆89┆┄┄standard and optional software.↲ ↲ ↲ ┆a1┆┆b0┆2.1╞ ╞ Hardware↲ ↲ ╞ ╞ ┆84┆The RC3900/1 system consists of two major hardware modules, ↓ ┆19┆┆89┆┄┄that is, the RC3922 Computer Unit and the RC3951 Disk Unit. The ↓ ┆19┆┆89┆┄┄system is always delivered with a rack designed for mounting ↓ ┆19┆┆89┆┄┄the two units.↲ ↲ ╞ ╞ ┆84┆The RC3922 Computer Unit is based on the industry standard ↓ ┆19┆┆89┆┄┄multibus board format. It contains a number of multibus boards, ↓ ┆19┆┆89┆┄┄that is:↲ ↲ ╞ ╞ ╞ ┆84┆CPU board using the Intel microprocessor 8086 and having a ↓ ┆19┆┆8e┆┄┄128 Kbyte on-board dynamic RAM. Included on the CPU board ↓ ┆19┆┆8e┆┄┄is also the memory management unit, which gives the XENIX ↓ ┆19┆┆8e┆┄┄system its important memory protection scheme.↲ ↲ ╞ ╞ ╞ ┆84┆Memory board with additional 512 Kbyte dynamic RAM with ↓ ┆19┆┆8e┆┄┄error correcting circuitry.↲ ↲ ╞ ╞ ╞ ┆84┆Intelligent disk controller, which can control both ↓ ┆19┆┆8e┆┄┄Winchester and floppy disks.↲ ↲ ╞ ╞ ╞ ┆84┆Intelligent terminal controller (ITC), which offloads the ↓ ┆19┆┆8e┆┄┄host CPU by taking care of the communication with the con┄↓ ┆19┆┆8e┆┄┄nected terminals. The terminal controller has a powerful ↓ ┆19┆┆8e┆┄┄on-board 80186 microprocessor. The ITC provides connection ↓ ┆19┆┆8e┆┄┄to four V.24 interfaces, and further to the new RcCircuit.↲ ↲ ╞ ╞ ┆84┆The RC3951 Disk Unit contains a Winchester disk and a floppy ↓ ┆19┆┆89┆┄┄disk unit. Both disks have a physical media size of 5 1/4 ↓ ┆19┆┆89┆┄┄inches. The Winchester memory capacity is 32 Mbytes unformat┄↓ ┆19┆┆89┆┄┄ted, and it can hold 30 Mbytes formatted. The floppy disk capa-↓ ┆19┆┆89┆┄┄city is unformatted 1.6 Mbytes. The logical size of the floppy ↓ ════════════════════════════════════════════════════════════════════════ ↓ is 8 inches, which means that it has the same number of tracks and bytes ↓ per track as 8 inch diskettes. The diskettes used in the system must be ↓ of good quality; we recommend Maxell MD2-HD (96 TPI).↲ ↲ ↲ ┆a1┆┆b0┆2.2╞ ╞ Optional Hardware↲ ↲ ╞ ╞ ┆84┆For use with the RC3900 computer system we recommend the matrix ↓ ┆19┆┆89┆┄┄printer RC3991, which has a parallel Centronics interface. This ↓ ┆19┆┆89┆┄┄printer features high speed - up to 250 cps. When used with the ↓ ┆19┆┆89┆┄┄RC3900/1, it gives the possibility of bold printing, under┄┄lin-↓ ┆19┆┆89┆┄┄ing, elongated printing and red printing.↲ ↲ ╞ ╞ ┆84┆It is also possible to connect a slower serial printer (matrix ↓ ┆19┆┆89┆┄┄or letter quality printer) to the computer system, and have ↓ ┆19┆┆89┆┄┄documents and letters printed out here.↲ ↲ ↲ ┆a1┆2.3╞ ╞ Terminals↲ ↲ ╞ ╞ ┆84┆Introduced with ┆a1┆┆e1┆the present┆e1┆ RC3900/1 computer is also a new ↓ ┆19┆┆89┆┄┄local terminal network called RcCircuit II. It gives the possi-↓ ┆19┆┆89┆┄┄bility of connecting a large number of RC855 terminals to the ↓ ┆19┆┆89┆┄┄computer only by means of a simple double twisted pair cable. ↓ ┆19┆┆89┆┄┄On the RC3900/1, however, the number of terminals on Circuit II ↓ ┆19┆┆89┆┄┄is limited to 4, because of the performance of the 8086 micro┄↓ ┆19┆┆89┆┄┄processor. To connect the RC855 terminals to Circuit II, they ↓ ┆19┆┆89┆┄┄must be upgraded with the TF305 feature.↲ ↲ ╞ ╞ ┆84┆The standard recommended terminal is the RC855, which can be ↓ ┆19┆┆89┆┄┄used in connection with either Circuit II or V.24 interfaces. ↓ ┆19┆┆89┆┄┄The RC855 can be a work station (with connected floppy disk) or ↓ ┆19┆┆89┆┄┄simply a terminal. The TTY emulator used with the RC3900/1 ↓ ┆19┆┆89┆┄┄should be Version 4.0.↲ ↲ ╞ ╞ ┆84┆Depending on the national version of the terminal, you may have ↓ ┆19┆┆89┆┄┄slightly different characters on the screen and the keyboard ↓ ┆19┆┆89┆┄┄than the ones indicated in this manual. (You might, for ↓ ┆19┆┆89┆┄┄example, get a paragraph sign, #, instead of a number sign, ). ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆2.4╞ ╞ ┆84┆Software↲ ↲ ╞ ╞ ┆84┆The basic software of the RC3900/1 is the general purpose, ↓ ┆19┆┆89┆┄┄multiuser, interactive XENIX *) operating system. XENIX is an ↓ ┆19┆┆89┆┄┄enhanced version of the famous UNIX **) system. The present ↓ ┆19┆┆89┆┄┄operating system is XENIX V2.3, based on UNIX V.7.↲ ╞ ╞ ┆84┆↲ ┆84┆The standard XENIX version has been enhanced by RC Computer ↓ ┆19┆┆89┆┄┄through the addition of several useful utilities.↲ ↲ ╞ ╞ ┆84┆Two of the standard XENIX utilities are the on-line manual and ↓ ┆19┆┆89┆┄┄computer aided learning.↲ ↲ ╞ ╞ ┆84┆Also standard on the RC3900/1 system is the UNIPLEX ***) word ↓ ┆19┆┆89┆┄┄processor and menu system.↲ ↲ ╞ ╞ ┆84┆┆84┆The great advantage of using a menu system is that even users ↓ ┆19┆┆89┆┄┄who don't know the underlying operating system can be guided by ↓ ┆19┆┆89┆┄┄means of menus to the desired applications in a totally self-↓ ┆19┆┆89┆┄┄explanatory way. Also accessible, in a very simple way, through ↓ ┆19┆┆89┆┄┄the menu system are many of the basic XENIX functions.↲ ↲ ╞ ╞ ┆84┆The UNIPLEX menu system allows the user to tailor the menus to ↓ ┆19┆┆89┆┄┄his specific needs if desired. These modifications can be made ↓ ┆19┆┆89┆┄┄simply with almost any text editor by making simple changes in ↓ ┆19┆┆89┆┄┄the system command file. If is also possible for the individual ↓ ┆19┆┆89┆┄┄user on the system to have entirely different systems and menu ↓ ┆19┆┆89┆┄┄characteristics.↲ ↲ ╞ ╞ ┆84┆When delivered from RC Computer, the system is configured with ↓ ┆19┆┆89┆┄┄a standard menu, which gives access to the standard implement-↓ ┆19┆┆89┆┄┄ed utilities and applications.↲ ↲ ╞ ╞ *) XENIX is a trademark of Microsoft.↲ ╞ ╞ **) UNIX is a trademark of Bell Laboratories.↲ ***) UNIPLEX is a trademark of Redwood.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆84┆The UNIPLEX word processor is a multiuser, full function word ↓ ┆19┆┆89┆┄┄processor designed specifically for the users of UNIX/XENIX ↓ ┆19┆┆89┆┄┄computers. It includes electronic mail, integrated spelling ↓ ┆19┆┆89┆┄┄checking, extra wide documents and reports, full cut and paste, ↓ ┆19┆┆89┆┄┄comprehensive help and assistance together with printing ↓ ┆19┆┆89┆┄┄control and many other facilities.↲ ↲ ↲ ┆a1┆┆b0┆2.5╞ ╞ Optional Software↲ ↲ ╞ ╞ ┆84┆As an example of the optional software available for the ↓ ┆19┆┆89┆┄┄RC3900/1 we can mention the Appointment Management System. This ↓ ┆19┆┆89┆┄┄is an RC Computer developed application, which facilitates the ↓ ┆19┆┆89┆┄┄planning of meetings and reservation of rooms.↲ ↲ ╞ ╞ ┆84┆The installation of the optional software is simple, as it is ↓ ┆19┆┆89┆┄┄menu driven. You merely have to select the newly purchased ↓ ┆19┆┆89┆┄┄application in the menu system, place the diskette in the ↓ ┆19┆┆89┆┄┄diskette drive, and press one key on the keyboard - that's all.↲ ↲ ↲ ┆a1┆┆b0┆2.6╞ ╞ System Administrator↲ ↲ ╞ ╞ ┆84┆It might be wise to appoint one of your users as the system ↓ ┆19┆┆89┆┄┄administrator - the person responsible for the overall opera┄↓ ┆19┆┆89┆┄┄tion of the computer. He will have to know more about the ↓ ┆19┆┆89┆┄┄system than the ordinary users. He will be the one who knows ↓ ┆19┆┆89┆┄┄the password of the super-user. He may also have responsibi┄lity ↓ ┆19┆┆89┆┄┄for the configuration of the system - connected terminals, ↓ ┆19┆┆89┆┄┄printers etc. - and for action in case of system abnormalities. ↓ ┆19┆┆89┆┄┄Please note that system error messages (if any) and a single ↓ ┆19┆┆89┆┄┄system message (** Normal System Shutdown **) are only routed ↓ ┆19┆┆89┆┄┄to one specific terminal (see Ch. 3, Hardware Installation).↲ ↲ ╞ ╞ ┆84┆Please refer to Chapter 6 in this manual for further tasks of ↓ ┆19┆┆89┆┄┄the system administrator.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆2.7╞ ╞ Some System Examples↲ ↲ ╞ ╞ ┆84┆On the following pages you see two examples of the use of the ↓ ┆19┆┆89┆┄┄RC3900/1 computer in different configurations.↲ ↲ ↲ ┆06┆┆b0┆RC3900/1↲ ┆06┆┆b0┆SYSTEM EXAMPLE No. 1↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆06┆RC855 with RC Circuit II Option↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆06┆┆b0┆RC3900/1↲ ┆06┆┆b0┆SYSTEM EXAMPLE No. 2↲ ┆14┆┆b3┆↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆┆05┆3-┆0b┆↲ ↲ ┆a1┆┆b0┆3.╞ ╞ HARDWARE INSTALLATION↲ ↲ ╞ ╞ ┆84┆Before setting up the RC3900 computer system, please make sure ↓ ┆19┆┆89┆┄┄that there has not been damage to the equipment during trans-↓ ┆19┆┆89┆┄┄portation. If so, contact your supplier at once.↲ ↲ ╞ ╞ The RC3900/1 system comprises in its basic version:↲ ↲ ╞ ╞ ╞ RC3922/1╞ ╞ ┆84┆Computer unit including power cable and ↓ ┆19┆┆9d┆┄┄User's Manual (2 white RC ring binders).↲ ↲ ╞ ╞ ╞ RC3951╞ ╞ ┆84┆Disk unit including power cable and 3 ↓ ┆19┆┆9d┆┄┄cables for connection to RC3922/1.↲ ↲ ╞ ╞ ╞ F106╞ ╞ ╞ ┆84┆Rack including power distribution outlet ↓ ┆19┆┆9d┆┄┄and rear cover plate.↲ ↲ ╞ ╞ ╞ SW3001╞ ╞ ┆84┆Operating system software.↲ ╞ ╞ ╞ ╞ ╞ ╞ ┆84┆(nine 5 1/4" diskettes) and XENIX ↓ ┆19┆┆9d┆┄┄documentation (2 white RC ring binders).↲ ↲ ╞ ╞ ╞ SW3701╞ ╞ ┆84┆UNIPLEX software (one 5 1/4" diskette) and ↓ ┆19┆┆9d┆┄┄documentation.↲ ↲ ↲ ┆a1┆┆b0┆3.1╞ ╞ Selection of Installation Site↲ ↲ ╞ ╞ ┆84┆Before installation of the system, you should consider the ↓ ┆19┆┆89┆┄┄following things:↲ ↲ ╞ ╞ FLOOR COVERING╞ ╞ ┆84┆You should select a floor covering that ↓ ┆19┆┆9d┆┄┄will not give problems with static ↓ ┆19┆┆9d┆┄┄electricity.↲ ↲ ╞ ╞ HUMIDITY╞ ╞ ╞ ┆84┆The humidity should not go below 40% (RH) - ↓ ┆19┆┆9d┆┄┄this could also cause static discharges. ↓ ┆19┆┆9d┆┄┄Nor should the humidity go above 80% (RH) - ↓ ┆19┆┆9d┆┄┄problems with dampness.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ LIGHT╞ ╞ ╞ ┆84┆The equipment should not be placed in ↓ ┆19┆┆9d┆┄┄direct sunlight as this might raise the ↓ ┆19┆┆9d┆┄┄temperature unneccessarily.↲ ↲ ╞ ╞ TEMPERATURE╞ ╞ ┆84┆The room temperature during normal use ↓ ┆19┆┆9d┆┄┄should be kept between 5┆81┆o┆82┆C and 30┆81┆o┆82┆C.↲ ╞ ╞ ╞ ╞ ╞ ╞ ┆84┆When the system is turned off, temperatures ↓ ┆19┆┆9d┆┄┄between 0┆81┆o┆82┆C and 50┆81┆o┆82┆C are tolerable.↲ ↲ ╞ ╞ POWER CONNECTION╞ ┆84┆The system is equipped with a three-con-↓ ┆19┆┆9d┆┄┄ductor power cable and should only be ↓ ┆19┆┆9d┆┄┄connect┄ed to a power outlet with a built-in ↓ ┆19┆┆9d┆┄┄ground. Other equipment connected to the ↓ ┆19┆┆9d┆┄┄computer (terminals etc.) should also be ↓ ┆19┆┆9d┆┄┄grounded. The RC3900/1 can be connected to ↓ ┆19┆┆9d┆┄┄power voltages between 200V AC and 240V AC.↲ ↲ ╞ ╞ ┆84┆Before mounting the units in the rack, you must ┆a1┆release the ↓ ┆19┆┆89┆┄┆84┆shipping lock┆e1┆ of the Winchester disk drive in the RC3951 Disk ↓ ┆19┆┆89┆┄┄Unit. This is done by first removing the cover of the RC3951 - ↓ ┆19┆┆89┆┄┄see figure 1.↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆06┆Figure 1.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ 1) Pull down the two pins in both sides and push them backward.↲ ╞ ╞ 2) Slowly push the cover backward and up.↲ ╞ ╞ 3) Lift the cover up.↲ ↲ ┆84┆When the cover is removed, you can see the Winchester drive and ↓ ┆19┆┆89┆┄┄the shipping lock (figure 2). The shipping lock must be pushed ↓ ┆19┆┆89┆┄┄forward approx. 1.5 cm.↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆06┆Figure 2.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆06┆Figure 3.↲ ↲ ↲ ╞ ╞ ┆84┆Then replace the cover, and when you push the pins A and B ↓ ┆19┆┆89┆┄┄forward they will automatically lock the cover.↲ ↲ ╞ ╞ ╞ ┆84┆If you, for any reason at a later time, should have to ↓ ┆19┆┆8e┆┄┄transport the disk drive, then ┆a1┆remembe┆a1┆r┆e1┆┆a1┆ to┆e1┆┆a1┆ lock the ship-↓ ┆19┆┆8e┆┄┆84┆ping lock.┆e1┆ This is done by pulling it approx. 1.5 cm out ↓ ┆19┆┆8e┆┄┄of the Winchester.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆84┆Now you are ready to mount the RC3922/1 and RC3951 units in the ↓ ┆19┆┆89┆┄┄rack. The double-height RC3922/1 computer unit is placed on the ↓ ┆19┆┆89┆┄┄lower platform and the RC3951 disk unit is placed on the upper ↓ ┆19┆┆89┆┄┄one. See figure 4. The rear of the two units is secured to the ↓ ┆19┆┆89┆┄┄rack by means of a locking mechanism. See figure 5.↲ ╞ ╞ ┆84┆This mechanism is found on both sides of both units.↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆06┆Figure 4.↲ ════════════════════════════════════════════════════════════════════════ ↓ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆06┆Figure 5.↲ ↲ ↲ ╞ ╞ ┆84┆When you place the rack-mounted system in its final location, ↓ ┆19┆┆89┆┄┄make sure that there is a space of at least 10 cm on the sides ↓ ┆19┆┆89┆┄┄and behind the unit. This is neccessary for sufficent cooling ↓ ┆19┆┆89┆┄┄of the unit.↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆3.2╞ ╞ Connections↲ ↲ ╞ ╞ ┆84┆The two units must be interconnected by means of three short ↓ ┆19┆┆89┆┄┄flat cables: Winchester disk A, Winchester disk B and flexible ↓ ┆19┆┆89┆┄┄disk. The three cables are supplied with the disk unit. See ↓ ┆19┆┆89┆┄┄figure 6 for all the rear connections. The two power cables are ↓ ┆19┆┆89┆┄┄connected to the power distribution panel that is delivered ↓ ┆19┆┆89┆┄┄with the rack. The two units have their own power switch, and ↓ ┆19┆┆89┆┄┄must be turned on and off separately.↲ ↲ ╞ ╞ ┆84┆The minimum configuration of peripheral equipment is one ↓ ┆19┆┆89┆┄┄terminal. During the first phase of the XENIX software ↓ ┆19┆┆89┆┄┄installation, the terminal must be connected to the consol ↓ ┆19┆┆89┆┄┄connector K1. Later it is disconnected and moved to the V.24 ↓ ┆19┆┆89┆┄┄communication connector J1, if you did not have a terminal on ↓ ┆19┆┆89┆┄┄the J1 port already. This connection, J1, is special, as all ↓ ┆19┆┆89┆┄┄system messages are sent to this output. We recommend always ↓ ┆19┆┆89┆┄┄having a terminal connected to J1 (default setting 9600 baud, ↓ ┆19┆┆89┆┄┄8 data bits, 1 stop bit, even parity).↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆06┆Figure 6.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆3.3╞ ╞ System Examples↲ ↲ ╞ ╞ ┆84┆On figure 7 and 8 you can see two examples of system configura-↓ ┆19┆┆89┆┄┄tions and the necessary extra cables for connection. Also the RC ↓ ┆19┆┆89┆┄┄numbers of the cables are mentioned, if you should want to buy ↓ ┆19┆┆89┆┄┄them.↲ ↲ ╞ ╞ ┆84┆If you want to get the cables elsewhere, figure 9 shows the use ↓ ┆19┆┆89┆┄┄of the different pins in the RC3900/1 connectors.↲ ↲ ╞ ╞ ┆84┆If you make use of RcCircuit II, you connect the RC855 ↓ ┆19┆┆89┆┄┄terminals with the TF305 option. On Circuit II one can acces┄s ↓ ┆19┆┆89┆┄┄a maximum of 4 RC855 terminals from the RC3900/1. These ↓ ┆19┆┆89┆┄┄terminals must be configured with secondary addresses 0 through ↓ ┆19┆┆89┆┄┄3, the baud rate must be 9600 baud, even parity, 8 data bits ↓ ┆19┆┆89┆┄┄and 1 stop bit. This requires the use of an RC TTY emula┄tor, ↓ ┆19┆┆89┆┄┄Version 4.0 or later.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆06┆┆b0┆RC3900/1↲ ┆06┆┆b0┆SYSTEM EXAMPLE No. 1↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆06┆Figure 7.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆06┆┆b0┆RC3900/1↲ ┆06┆┆b0┆SYSTEM EXAMPLE No. 2↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ↲ ┆82┆┆06┆Figure 8.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆06┆┆a1┆┆b0┆RC3900/1 External Connections↲ ↲ ________________________________________________________________________↲ ╞ PRINTER ! (25 pol D Sub female) ! KBL 599, 5m, to Centronics↲ ╞ K1╞ ! --- " ---╞ ! CBL 561, 25m, to RC855, V.24↲ ╞ J1 - J4 ! --- " --- ! ---- " ---- ---- " ----↲ C2 ! (5 pol DIN male) ! KBL 604, 5m, to wall outlet↲ C1 ! (3 pol DIN male) ! Not used↲ ┆a1┆_┆05┆_↲ ↲ ╱0400274e0c0006000000000201483160000000000000000000000000000000000000000000000000050a0f14191e23282d32373c41464bff04╱ ╱0400274e0c0006000000000301483160000000000000000000000000000000000000000000000000050a0f14191e23282d32373c41464bff04╱ ↓ ┆a1┆┆e1┆ ┆a1┆ Pin No. PRINTER K1 J1 - J4 ↲ 1 ! DATA STROBE ! !╞ ╞ ╞ !↲ 2 ! DATA 0 ! TDX !╞ TDX╞ ╞ !↲ 3 ! 1╞ ! RDX ! RDX ╞ ╞ !↲ 4 ! 2╞ ╞ ! RTS ! RTS╞ ╞ !↲ 5 ! 3╞ ╞ ! CTS ! CTS (RFS) !↲ 6 ! 4 ! DSR ! DSR !↲ 7 ! 5 ! GND ! GND !↲ 8 ! 6╞ ╞ ! ! CARRIER ON !↲ 9 ! 7 ! ! !↲ 10 ! ACKNOWLEDGE ! ! !↲ 11 ! ╞ ╞ ╞ !╞ ╞ !╞ ╞ ╞ !↲ ╞ ╞ 12 ! PAPER END╞ ╞ !╞ ╞ !╞ ╞ ╞ !↲ ╞ ╞ 13╞ ! SELECTED╞ ╞ !╞ ╞ !╞ ╞ ╞ !↲ ╞ ╞ 14╞ !╞ ╞ ╞ ╞ !╞ ╞ !╞ ╞ ╞ !↲ ╞ ╞ 15╞ !╞ ╞ ╞ ╞ !╞ ╞ !╞ ╞ ╞ !↲ ╞ ╞ 16╞ !╞ ╞ ╞ ╞ !╞ ╞ !╞ ╞ ╞ !↲ ╞ ╞ 17╞ !╞ ╞ ╞ ╞ !╞ ╞ !╞ ╞ ╞ !↲ ╞ ╞ 18╞ ! GND╞ ╞ ╞ !╞ ╞ !╞ ╞ ╞ !↲ ╞ ╞ 19 ! -╞ ╞ ╞ !╞ ╞ !╞ ╞ !↲ ╞ ╞ 20╞ ! -╞ ╞ ╞ !╞ DTR╞ !╞ DTR╞ ╞ !↲ ╞ ╞ 21╞ ! -╞ ╞ ╞ !╞ ╞ !╞ ╞ ╞ !↲ ╞ ╞ 22╞ ! -╞ ╞ ╞ !╞ ╞ ! CALLING INDICATOR !↲ ╞ ╞ 23╞ !╞ -╞ ╞ ╞ !╞ ╞ !╞ ╞ ╞ ╞ !↲ ╞ ╞ 24╞ ! -╞ ╞ ╞ !╞ ╞ !╞ ╞ ╞ ╞ !↲ ╞ ┆a1┆╞ 25╞ ! !╞ ╞ !╞ ╞ ╞ ╞ !↲ ↲ ┆06┆Figure 9.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆┆05┆4-┆0b┆↲ ┆a1┆┆b0┆4.╞ ╞ XENIX AND UNIPLEX INSTALLATION↲ ↲ ╞ ╞ ┆84┆This chapter tells how to install the XENIX and UNIPLEX ↓ ┆19┆┆89┆┄┄systems.↲ ↲ ↲ ┆a1┆┆b0┆4.1╞ ╞ Installation of XENIX↲ ↲ ╞ ╞ ┆84┆This section describes how to install the XENIX distribution ↓ ┆19┆┆89┆┄┄provided on a set of mini-floppy diskettes onto an empty ↓ ┆19┆┆89┆┄┄RC3900/1 computer system.↲ ↲ ↲ ┆a1┆┆b0┆4.1.1╞ Distribution Format↲ ↲ ╞ ╞ ┆84┆The distribution is organized as follows:↲ ↲ ╞ ╞ Bootable disk:╞ ┆84┆One floppy contains a minimum file system with ↓ ┆19┆┆98┆┄┄swap space and a boot track.↲ ↲ ╞ ╞ File system:╞ ┆84┆A set of floppies containing a dump in "tar" ↓ ┆19┆┆98┆┄┄format of the entire file system.↲ ↲ ↲ ┆a1┆┆b0┆4.1.2╞ Installing the Distribution↲ ↲ ╞ ╞ ┆84┆The following describes in detail the steps required to gene-↓ ┆19┆┆89┆┄┄rate a XENIX system to run on the Winchester disk.↲ ↲ ╞ ╞ ┆84┆First ensure that the machine is installed in accordance with ↓ ┆19┆┆89┆┄┄Chapter 3 of this manual. You must have a terminal on the ↓ ┆19┆┆89┆┄┄console port K1, and if possible one on the port J1 as well; ↓ ┆19┆┆89┆┄┄the latter is not required though. The baud rate on K1 should ↓ ┆19┆┆89┆┄┄be 9600 bauds or lower, 8 bit/char, 1 stop bit/char, and no ↓ ┆19┆┆89┆┄┄parity.↲ ↲ ╞ ╞ ┆84┆Note that, in the following description, ┆a1┆computer output┆e1┆ is in-↓ ┆19┆┆89┆┄┄dicated by underlining, whereas the user's response is not. ↓ ════════════════════════════════════════════════════════════════════════ ↓ ┆19┆┆89┆┄┄Terminate all input with <CR>. Use <backspace> to erase the ↓ ┆19┆┆89┆┄┄previous character, and <a> to erase the whole line. Text with┄↓ ┆19┆┆89┆┄┄in '()' is explanatory and is not meant to be entered literal┄↓ ┆19┆┆89┆┄┄ly.↲ ↲ ╞ ╞ 1. ┆84┆┆84┆Turn on the CPU unit and the disk unit. Then press ↓ ┆19┆┆8c┆┄┄<CR> on the console keyboard, and asterisks (*) will be ↓ ┆19┆┆8c┆┄┄printed on the console. Press U (<shift>u) once or twice and ↓ ┆19┆┆8c┆┄┄if all is well, the following prompt will be seen on the ↓ ┆19┆┆8c┆┄┄console:↲ ↲ ╞ ╞ ╞ ┆a1┆RC3922 Monitor, iSBC 86/30 version, rel 1.6↲ ↲ ╞ ╞ 2. ┆84┆Now insert the bootable disk, labled "DISK0", and close the ↓ ┆19┆┆8c┆┄┄drive door lever. The bootstrap program can now be loaded ↓ ┆19┆┆8c┆┄┄and run, causing XENIX to be loaded and run. The argument ↓ ┆19┆┆8c┆┄┄passed to the boot program is the name of the file it will ↓ ┆19┆┆8c┆┄┄load and run. In the initial case this will be '/xenix.fd'.↲ ↲ ╞ ╞ (Load and Go from Floppy, pass argument "/xenix.fd")↲ ╞ ╞ ┆a1┆┆e1┆ ┆a1┆.┆e1┆┆e1┆ LFG:/XENIX.FD↲ ╞ ╞ ┆a1┆load ok, 10 records↲ ↲ ╞ ╞ ┆84┆From now on the output will be sent to the first direct line ↓ ┆19┆┆8c┆┄┄on the ITC controller, J1. So, if you only have one terminal ↓ ┆19┆┆8c┆┄┄- now on the K1 port - change it to the J1 port, which from ↓ ┆19┆┆8c┆┄┄now on will be the console. The terminal on J1 should be ↓ ┆19┆┆8c┆┄┄configured to 8 databits, 1 stop bit, and even parity. In ↓ ┆19┆┆8c┆┄┄any case disconnect the K1 port. If you already had a ↓ ┆19┆┆8c┆┄┄terminal on the J1 port, you should see the following output ↓ ┆19┆┆8c┆┄┄there:↲ ↲ ╞ ╞ ╞ ┆a1┆mem = 514k↲ ┆a1┆about to start itc 0┆e1┆↲ ↲ ╞ ╞ ╞ ┆84┆┆a1┆No Single-user login present↲ ↲ ╞ ╞ ╞ ┆a1┆Entering System Maintenance mode┆81┆↲ ↲ ╞ ┆84┆In any case press <CR> and the following output should ↓ ┆19┆┆8c┆┄┄appear:↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ╞ ┆a1┆┆e1┆┆a1┆Xenix-86 2.3 Distribution System┆e1┆ ┆a1┆(Floppy)↲ ╞ ╞ ╞ ┆a1┆┆0b┆(backspace is h , erase line is u)↲ ↲ ╞ ╞ ╞ ┆a1┆I think it's <date>↲ ╞ ╞ ┆a1┆Enter time yymmdd hhmm .ss : ┆e1┆↲ ↲ Here you set the system's idea of the time. Say, today is↲ ┆84┆7 September 1984 and it's 25 minutes past 10 in the morning; ↓ ┆19┆┆8c┆┄┄you should enter: 8409071025↲ ↲ ┆84┆XENIX is now running on the floppy: the ' ' prompt indicates ↓ ┆19┆┆8c┆┄┄that the super-user shell is running. Volume 1 of the ┆a1┆XENIX┆e1┆ ↓ ┆19┆┆8c┆┄┄┆a1┆Programmer's Manual┆e1┆ is now applicable.↲ ↲ ╞ ╞ 3. ┆84┆We are now ready to make a file system on the Winchester ↓ ┆19┆┆8c┆┄┄disk, and then boot up XENIX on it. This is done using the ↓ ┆19┆┆8c┆┄┄utility "/etc/mkwini", which formats the disk, makes the ↓ ┆19┆┆8c┆┄┄root and usr file systems, and copies a minimum system onto ↓ ┆19┆┆8c┆┄┄the root file system.↲ ↲ ╞ ╞ ╞ (make system on Winchester)↲ ╞ ╞ ┆a1┆┆e1┆┆a1┆┆e1┆_┆e1┆┆a1┆┆e1┆┆e1┆ /etc/mkwini↲ ╞ ╞ ╞ (answer y for yes to the following)↲ ╞ ╞ ╞ ┆a1┆About to initialize drive, OK? ┆e1┆↲ ╞ ╞ ╞ (Winchester formatting takes about 6 minutes)↲ ╞ ╞ ╞ (/etc/mkwini takes all told about 12 minutes)↲ ╞ ╞ ╞ (last output:)↲ ╞ ╞ ╞ ┆a1┆/etc/haltsys and reboot Xenix.┆e1┆↲ ╞ ╞ ╞ (shut down system)↲ ╞ ╞ ╞ ┆a1┆┆e1┆┆e1┆┆a1┆┆e1┆_┆e1┆ /etc/haltsys↲ ╞ ╞ ╞ ┆a1┆** Normal system shutdown **↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ 4. ┆84┆Now press the reset button or switch the CPU box off and on ↓ ┆19┆┆8c┆┄┄again, and boot up XENIX from the Winchester disk: after ↓ ┆19┆┆8c┆┄┄resetting, XENIX should be booted up automatically if you ↓ ┆19┆┆8c┆┄┄have no terminal on the console serial port.↲ ↲ ╞ ╞ ╞ ┆a1┆mem = 514k↲ ╞ ╞ ╞ ╞ ╞ ┆a1┆about to start itc 0↲ ↲ ┆a1┆No Single-user login present↲ ╞ ╞ ╞ ┆a1┆Entering System Maintenance mode↲ ╞ ╞ ╞ ┆a1┆┆0b┆↲ ╞ ╞ ╞ ┆a1┆I think it's <date> etc.↲ ╞ ╞ ╞ (you have to set the time again, see step 2)↲ ↲ ╞ ╞ 5. ┆84┆Now you will need to install the rest of the XENIX system on ↓ ┆19┆┆8c┆┄┄the Winchester disk. This is done using the utility ↓ ┆19┆┆8c┆┄┄"/etc/mksys", which will create all standard directories and ↓ ┆19┆┆8c┆┄┄prompt you for the rest of the floppies:↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ╞ (install rest of system)↲ ╞ ╞ ╞ ┆a1┆┆e1┆┆a1┆┆e1┆_┆e1┆┆e1┆ /etc/mksys↲ ╞ ╞ ╞ ┆a1┆System installation program↲ ╞ ╞ ╞ ┆a1┆Update ? Type yes or no (y/n):┆e1┆ n↲ ↲ ╞ ╞ ╞ (no update, whole system)↲ ╞ ╞ ╞ ┆a1┆Installing complete XENIX system↲ ↲ ╞ ╞ ╞ ┆a1┆Creating standard directories↲ ╞ ╞ ╞ (takes about 6 minutes)↲ ↲ ↲ ╞ ╞ ╞ ┆a1┆Please insert diskette no. 1↲ ╞ ╞ ╞ ┆a1┆Press <RETURN> when ready:↲ ↲ ╞ ╞ ╞ .↲ ╞ ╞ ╞ .↲ ╞ ╞ ╞ .↲ ╞ ╞ ╞ (all floppies are installed in this way)↲ ╞ ╞ ╞ .↲ ╞ ╞ ╞ .↲ ╞ ╞ ╞ .↲ ↲ ↲ ╞ ╞ ╞ ┆a1┆Which ID do you want to give to your system:↲ ↲ ╞ ╞ ╞ ┆84┆(now you should type ONE word, which will be your ↓ ┆19┆┆8e┆┄┄systemid; this ID will be used if your system is to ↓ ┆19┆┆8e┆┄┄communicate with another XENIX system; you may change the ↓ ┆19┆┆8e┆┄┄systemid later, when you have become more familiar with ↓ ┆19┆┆8e┆┄┄XENIX)↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ╞ ┆a1┆<your id> written to /etc/systemid↲ ╞ ╞ ╞ ┆a1┆XENIX system installed!!↲ ↲ ╞ ╞ 6. ┆84┆The system is now fully installed on the Winchester disk. To ↓ ┆19┆┆8c┆┄┄take the system multiuser, type <ctrl>d. Wait approximately ↓ ┆19┆┆8c┆┄┄20 seconds; then press any key, and you should get a login ↓ ┆19┆┆8c┆┄┄message:↲ ↲ ╞ ╞ ╞ ┆a1┆login:↲ ↲ ╞ ┆84┆Now type a user name (i.e. root) and you should be logged ↓ ┆19┆┆8c┆┄┄in. To log out, type <ctrl>d. To shut the system down, ↓ ┆19┆┆8c┆┄┄always log in as root, and run /etc/shutdown(8). This ↓ ┆19┆┆8c┆┄┄ensures that the system will always close down in an orderly ↓ ┆19┆┆8c┆┄┄manner.↲ ↲ ╞ ╞ ┆84┆For further details on operating procedures, see Chapter 6 of ↓ ┆19┆┆89┆┄┄this manual.↲ ↲ ↲ ┆a1┆┆b0┆4.2╞ ╞ Installation of UNIPLEX↲ ↲ ╞ ╞ ┆84┆Installation of the Uniplex System is simple. First log in as ↓ ┆19┆┆89┆┄┄super-user. Then type the command:↲ ↲ ╞ ╞ ╞ /usr/rcspe/installuniplex↲ ↲ ╞ ╞ ┆84┆The installation script will prompt you to place the Master ↓ ┆19┆┆89┆┄┄diskette in the floppy drive -- but everything else is taken ↓ ┆19┆┆89┆┄┄care of. The whole procedure should take less than five ↓ ┆19┆┆89┆┄┄minutes.↲ ↲ ╞ ╞ You can now use the system by typing the command:↲ ↲ ╞ ╞ ╞ uniplex↲ ↲ ╞ ╞ For further information, consult the Uniplex manual.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆┆05┆5-┆0b┆↲ ┆a1┆┆b0┆5.╞ ╞ CONFIGURATION↲ ↲ ╞ ╞ ┆84┆This chapter describes configuration of the intelligent termi-↓ ┆19┆┆89┆┄┄nal controller and connected terminals.↲ ↲ ↲ ┆a1┆┆b0┆5.1╞ ╞ Configuration of the ITC↲ ↲ ╞ ╞ ┆84┆When the system is loaded, the file /etc/itc is written into ↓ ┆19┆┆89┆┄┄the memory of the ITC (intelligent terminal controller). This ↓ ┆19┆┆89┆┄┄file contains the program that runs on the ITC when the XENIX ↓ ┆19┆┆89┆┄┄system is running. Another file, /etc/itc_param, is also trans-↓ ┆19┆┆89┆┄┄ferred to the ITC memory. This file contains parameters de-↓ ┆19┆┆89┆┄┄scribing the four V.24 lines.↲ ↲ ╞ ╞ ┆84┆The etc/itc_param file consists of five lines, of which the ↓ ┆19┆┆89┆┄┄first four lines each describes a V.24 line, i.e. line 1 de-↓ ┆19┆┆89┆┄┄scribes the terminal connected to plug J1, line 2 describes ↓ ┆19┆┆89┆┄┄that connected to plug J2, and so on. Each of these four lines ↓ ┆19┆┆89┆┄┄contains five characters, and the format is shown on the next ↓ ┆19┆┆89┆┄┄page.↲ ↲ ╞ ╞ ┆84┆The fifth and last line in the /etc/itc_param file contains ↓ ┆19┆┆89┆┄┄only one character, which should be zero (0). This character, ↓ ┆19┆┆89┆┄┄however, must be changed to a one (1) if (and only if) the ↓ ┆19┆┆89┆┄┄system (the ITC firmware) is to be debugged. In this case, the ↓ ┆19┆┆89┆┄┄ITC firmware will enter the debug monitor when loaded. Also, a ↓ ┆19┆┆89┆┄┄<ctrl>a from the terminal connected to J1 will cause the firm┄↓ ┆19┆┆89┆┄┄ware to enter the debug monitor.↲ ↲ ╞ ╞ ┆84┆NOTE: Be careful about the format of the /etc/itc_param file -- ↓ ┆19┆┆89┆┄┄the ITC firmware does not check the values!↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆84┆Format of terminal description line in /etc/itc_param file:↲ ↲ ╞ ╞ ┆a1┆Char. No.┆e1┆╞ ┆a1┆Value┆e1┆ ┆a1┆Meaning↲ ↲ ╞ ╞ 1╞ ╞ 0╞ 9600 bauds (XENIX adjustment to terminal) (*)↲ ╞ ╞ ╞ ╞ 1 9600 bauds (110 bauds) (*)↲ ╞ ╞ ╞ ╞ 2 9600 bauds (200 bauds) (*)↲ ╞ ╞ ╞ ╞ 3 300 bauds↲ ╞ ╞ ╞ ╞ 4 600 bauds↲ ╞ ╞ ╞ ╞ 5 1200 bauds↲ ╞ ╞ ╞ ╞ 6 2400 bauds↲ ╞ ╞ ╞ ╞ 7 4800 bauds↲ ╞ ╞ ╞ ╞ D >7 9600 bauds↲ ╞ ╞ ╞ ╞ ╞ (*) reserved for later versions↲ ↲ ╞ ╞ 2╞ ╞ 0 7 data bits/character↲ ╞ ╞ ╞ ╞ D 1 8 data bits/character↲ ↲ ╞ ╞ 3╞ ╞ 0 1 stop bit/character↲ ╞ ╞ ╞ ╞ D 1 1 stop bit/character↲ ╞ ╞ ╞ ╞ 2 1 1/2 stop bits/character↲ ╞ ╞ ╞ ╞ 3 2 stop bits/character↲ ↲ ╞ ╞ 4╞ ╞ 0 no parity↲ ╞ ╞ ╞ ╞ 1 odd parity↲ ╞ ╞ ╞ ╞ 2 no parity↲ ╞ ╞ ╞ ╞ D 3 even parity↲ ↲ ╞ ╞ 5╞ ╞ 0 direct line Terminals connected to normal↲ ╞ ╞ ╞ ╞ D 1 normal line╞ lines may log in. Printers↲ should be connected to direct↲ ╞ ╞ ╞ ╞ ╞ ╞ ╞ lines.↲ ↲ ╞ ╞ ┆84┆The default values are denoted by a D.↲ ↲ ╞ ╞ ┆84┆Thus, for example, if a terminal description line contains ↓ ┆19┆┆89┆┄┄characters with the values 81131, it means: 9600 bauds, 8 data ↓ ┆19┆┆89┆┄┄bits/character, 1 stop bit/character, even parity, and normal ↓ ┆19┆┆89┆┄┄line.↲ ↲ ╞ ╞ Note that each terminal description line is terminated by CR.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆5.2╞ ╞ Terminal Support↲ ↲ ╞ ╞ ┆84┆A number of utilities and applications, for example, vi and ↓ ┆19┆┆89┆┄┄UNIPLEX, employ more advanced screen functions, such as cursor ↓ ┆19┆┆89┆┄┄addressing. Different terminals require different character ↓ ┆19┆┆89┆┄┄strings in order to perform a function. The various functions ↓ ┆19┆┆89┆┄┄and the correspondidng character strings are described in the ↓ ┆19┆┆89┆┄┄file /etc/termcap. Each terminal supported has a two-letter ↓ ┆19┆┆89┆┄┄entry -- a key -- in this file. The system uses the environment ↓ ┆19┆┆89┆┄┄parameter TERM as a key, i.e. if you are working on a terminal ↓ ┆19┆┆89┆┄┄whose description corresponds to the key "qr", your TERM vari┄↓ ┆19┆┆89┆┄┄able should be set to "qr". The TERM variable is usually set on ↓ ┆19┆┆89┆┄┄login in your ┆a1┆.profile┆e1┆ (SHELL) or ┆a1┆.cshrc┆e1┆ (C-SHELL) file. ↲ ↲ ╞ ╞ The keys in the /etc/termcap file are:↲ ↲ ╞ ╞ ╞ qr : RC855 - emulator Version 4.0↲ ╞ ╞ ╞ qw : RC855 - emulator Version 1.0↲ ╞ ╞ ╞ qq : RC822↲ ╞ ╞ ╞ qu : qvt102 Qume↲ ↲ ╞ ╞ ┆84┆In addition, a large number of terminals are described in the ↓ ┆19┆┆89┆┄┄file /etc/termcap.old. If you wish to use a terminal entry from ↓ ┆19┆┆89┆┄┄this file, you must first copy the description to /etc/termcap.↲ ↲ ╞ ╞ For further information, see↲ ↲ ╞ ╞ ╞ PRINTENV(ucB)↲ ╞ ╞ ╞ SH(1)↲ ╞ ╞ ╞ CSH(ucB)↲ ╞ ╞ ╞ environment(5)↲ ╞ ╞ ╞ termcap(5)↲ ↲ ╞ ╞ in Volume 1 of the ┆a1┆XENIX Programmer's Manual.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆ 6.┆0b┆↲ ┆b0┆┆a1┆6. SYSTEM ADMINISTRATOR↲ ↲ ┆b0┆┆a1┆6.1 Introduction↲ ↲ ┆84┆This chapter is intended to help you get the XENIX ↓ ┆19┆┆89┆┄┄system running on your computer, and keep the system ↓ ┆19┆┆89┆┄┄healthy. Even if you have never used the XENIX system, ↓ ┆19┆┆89┆┄┄or for that matter, any other computer operating system ↓ ┆19┆┆89┆┄┄before, it will give you enough information to give you ↓ ┆19┆┆89┆┄┄confidence in your role as system manager. Each section ↓ ┆19┆┆89┆┄┄provides directions for carrying out the procedures for ↓ ┆19┆┆89┆┄┄which you will be responsible, along with an overview of ↓ ┆19┆┆89┆┄┄XENIX system concepts. These procedures have been ↓ ┆19┆┆89┆┄┄designed to make your job as easy as possible. If you ↓ ┆19┆┆89┆┄┄read the instructions carefully, you should have little ↓ ┆19┆┆89┆┄┄difficulty in maintaining your XENIX system. This ↓ ┆19┆┆89┆┄┄introduction defines the role of the system manager and ↓ ┆19┆┆89┆┄┄describes what you get in your XENIX distribution ↓ ┆19┆┆89┆┄┄package.↲ ↲ ┆84┆Since the system manager's job is a crucial one with ↓ ┆19┆┆89┆┄┄many aspects, you should learn as much as you can about ↓ ┆19┆┆89┆┄┄the XENIX system. By the time you have finished this ↓ ┆19┆┆89┆┄┄chapter and feel comfortable with the tasks described ↓ ┆19┆┆89┆┄┄here, you should be able to use a number of basic XENIX ↓ ┆19┆┆89┆┄┄commands successfully. This chapter is designed to get ↓ ┆19┆┆89┆┄┄you going with your XENIX system without any prior ↓ ┆19┆┆89┆┄┄experience, and without needing to refer to other, more ↓ ┆19┆┆89┆┄┄detailed documentation. Ideally, however, you should ↓ ┆19┆┆89┆┄┄begin to develop an understanding of the following, in ↓ ┆19┆┆89┆┄┄order to make you more efficient in your work:↲ ↲ . ┆84┆the XENIX file structure - - the way in which the XENIX ↓ ┆19┆┆8b┆┄┄programs, as well as the data and programs you and other ↓ ┆19┆┆8b┆┄┄users add, are organized on the system.↲ ↲ . ┆84┆the command language of the XENIX "shell", which you will ↓ ┆19┆┆8b┆┄┄be using to communicate with XENIX, a powerful tool for ↓ ┆19┆┆8b┆┄┄increasing your productivity on the system.↲ ↲ . ┆84┆at least one of the XENIX text editors, so that you can ↓ ┆19┆┆8b┆┄┄make additions and changes to important system files.↲ ↲ ┆84┆Some basic information about these XENIX features is ↓ ┆19┆┆89┆┄┄provided in the next section. However, as you gain more ↓ ┆19┆┆89┆┄┄experience with XENIX, you will want to read the XENIX ↓ ┆19┆┆89┆┄┄Fundamentals manual so that you will be able to use the ↓ ┆19┆┆89┆┄┄features of the XENIX system more fully. To do this, ↓ ┆19┆┆89┆┄┄there is no substitute for reading the documentation ↓ ┆19┆┆89┆┄┄carefully, and trying out the examples given in the ↓ ┆19┆┆89┆┄┄tutorials. You may also want to refer to the XENIX ↓ ┆19┆┆89┆┄┄System Reference Manual (i.e. the XENIX Programmer's ↓ ┆19┆┆89┆┄┄Manual, Vol. 1) when you have questions about how to use ↓ ┆19┆┆89┆┄┄particular XENIX commands.↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.1.1 The Role of the System Manager↲ ↲ ┆84┆You may have heard the term "system manager" or "system ↓ ┆19┆┆89┆┄┄administrator" used to describe the person who has the ↓ ┆19┆┆89┆┄┄overall responsibility for the health and welfare of a ↓ ┆19┆┆89┆┄┄computer system. On a large computer this is often a full ↓ ┆19┆┆89┆┄┄time job for one or more people. On your system, of course, ↓ ┆19┆┆89┆┄┄you may have only a few users, or you may even be your own ↓ ┆19┆┆89┆┄┄system manager. This will make your job considerably less ↓ ┆19┆┆89┆┄┄time-consuming, but no less critical. Your tasks will ↓ ┆19┆┆89┆┄┄include↲ ↲ . ┆84┆the initial installation of the XENIX system↲ ↲ . ┆84┆adding and removing user accounts, passwords, and file ↓ ┆19┆┆8b┆┄┄systems↲ ↲ . ┆84┆ensuring that system resources are efficiently ↓ ┆19┆┆8b┆┄┄distributed↲ ↲ . ┆84┆"backing up" or making copies of all files on the ↓ ┆19┆┆8b┆┄┄system to guard against the loss of programs and data, ↓ ┆19┆┆8b┆┄┄in case of user or hardware errors.↲ ↲ ┆84┆You will need to manage a library of floppy disks and ↓ ┆19┆┆89┆┄┄other storage media containing system backups, user ↓ ┆19┆┆89┆┄┄files, and application programs. In addition, you may ↓ ┆19┆┆89┆┄┄also be called upon to give training and support to new ↓ ┆19┆┆89┆┄┄users and deal with hardware and software suppliers if ↓ ┆19┆┆89┆┄┄problems develop.↲ ↲ ┆84┆Sometimes your job may make you unpopular with your ↓ ┆19┆┆89┆┄┄users. For example, you may have to interrupt users for ↓ ┆19┆┆89┆┄┄scheduled backups or keep reminding them to remove their ↓ ┆19┆┆89┆┄┄little-used files from an overcrowded disk. On the other ↓ ┆19┆┆89┆┄┄hand, doing your job well will result in an efficiently ↓ ┆19┆┆89┆┄┄running system with productive, rather than frustrated, ↓ ┆19┆┆89┆┄┄users. You will also be minimizing potentially time-↓ ┆19┆┆89┆┄┄consuming and expensive losses of programs, data, and ↓ ┆19┆┆89┆┄┄text.↲ ↲ ↲ ┆b0┆┆a1┆6.1.2 The XENIX System↲ ↲ ┆84┆Like any other operating system, the XENIX system is a ↓ ┆19┆┆89┆┄┄collection of programs which are resident in a computer ↓ ┆19┆┆89┆┄┄at all times and are designed to control its resources. ↓ ┆19┆┆89┆┄┄These programs make possible communication between the ↓ ┆19┆┆89┆┄┄central processor, input/output devices (such as line ↓ ┆19┆┆89┆┄┄printers and terminals), and storage devices (including ↓ ┆19┆┆89┆┄┄hard and floppy disk drives). These programs also ↓ ┆19┆┆89┆┄┄control the user's access to the files on the system, ↓ ┆19┆┆89┆┄┄and determine what share of processing time each program ↓ ┆19┆┆89┆┄┄will get. An operating system ensures processing time ↓ ┆19┆┆89┆┄┄and disk space will be fairly distributed among users.↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.1.3 Hard Disk vs. Floppy-Only Systems↲ ↲ ┆84┆The XENIX system is derived from UNIX operating system ↓ ┆19┆┆89┆┄┄software developed by Bell Laboratories a number of ↓ ┆19┆┆89┆┄┄years ago and widely used on larger computer systems. ↓ ┆19┆┆89┆┄┄The XENIX system is a multi-user and multi-tasking ↓ ┆19┆┆89┆┄┄system. That is, it allows more than one user ↓ ┆19┆┆89┆┄┄simultaneous access to the computer's resources, and ↓ ┆19┆┆89┆┄┄allows more than one process or program to run at the ↓ ┆19┆┆89┆┄┄same time. In most respects, your XENIX system is ↓ ┆19┆┆89┆┄┄identical to those on much larger and more expensive ↓ ┆19┆┆89┆┄┄systems. However, the extent to which you are able to ↓ ┆19┆┆89┆┄┄utilize its features will depend somewhat on the size ↓ ┆19┆┆89┆┄┄and characteristics of your hardware components. ↓ ┆19┆┆89┆┄┄Naturally, several users will be unable to work ↓ ┆19┆┆89┆┄┄simultaneously unless you have several terminals ↓ ┆19┆┆89┆┄┄attached to your system. However, with XENIX you will ↓ ┆19┆┆89┆┄┄still be able to create separate accounts and file ↓ ┆19┆┆89┆┄┄storage areas for different users to access at different ↓ ┆19┆┆89┆┄┄times. More important from the system's point of view, ↓ ┆19┆┆89┆┄┄however, is the total size of the disk resources ↓ ┆19┆┆89┆┄┄available to you. If your system is equipped with a hard ↓ ┆19┆┆89┆┄┄disk as well as one or more floppy disk drives, you will ↓ ┆19┆┆89┆┄┄experience few limitations.↲ ↲ ┆84┆In the sections which follow, it is generally assumed ↓ ┆19┆┆89┆┄┄that you are working with a system equipped with a hard ↓ ┆19┆┆89┆┄┄disk and that you have several users, although many of ↓ ┆19┆┆89┆┄┄the same procedures also apply to single-user ↓ ┆19┆┆89┆┄┄environments. If you are using a XENIX system without a ↓ ┆19┆┆89┆┄┄hard disk, you should turn immediately to the special ↓ ┆19┆┆89┆┄┄instructions provided with your floppy-disk based ↓ ┆19┆┆89┆┄┄system.↲ ↲ ↲ ┆b0┆┆a1┆6.1.4 Outline of This Chapter↲ ↲ ┆84┆Since this chapter is directed at the user who is ↓ ┆19┆┆89┆┄┄responsible for maintaining a healthy XENIX system, the ↓ ┆19┆┆89┆┄┄sections are organized by the type of maintenance task ↓ ┆19┆┆89┆┄┄the system manager will need to perform:↲ ↲ ┆84┆Section 6.1: Introduction↲ ┆84┆The section you are now reading.↲ ↲ Section 6.2: A First Look at Your XENIX system↲ ┆84┆Although by no means an exhaustive introduction to the ↓ ┆19┆┆89┆┄┄XENIX system, this section is intended to provide you ↓ ┆19┆┆89┆┄┄with sufficient information in order to get you started ↓ ┆19┆┆89┆┄┄as a XENIX system manager.↲ ↲ ┆84┆Section 6.3: Getting the System Ready for Your Users↲ ┆84┆This section explains how to create, change, and remove ↓ ┆19┆┆89┆┄┄user accounts on your XENIX system.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ Section 6.4: Controlling Access to Files and Directories↲ ┆84┆This section explains how the XENIX system restricts the ↓ ┆19┆┆89┆┄┄use of particular files and directories on your system ↓ ┆19┆┆89┆┄┄with "permissions" settings. It also explains the ↓ ┆19┆┆89┆┄┄following system maintenance tasks:↲ ↲ - ┆84┆how to establish and change permission settings↲ ↲ - how to create and change group ID's↲ ↲ - how to determine file ownership and change it↲ ↲ - how to deal with system security↲ ↲ Section 6.5: Keeping Your System Healthy↲ ┆84┆This section explains some of the system's self-checking ↓ ┆19┆┆89┆┄┄processes, and tells you how to manage the critical ↓ ┆19┆┆89┆┄┄resource of disk space with some routine maintenance ↓ ┆19┆┆89┆┄┄procedures.↲ ↲ Section 6.6: Backing Up Your System↲ ┆84┆This section explains one of the system manager's most ↓ ┆19┆┆89┆┄┄critical tasks: periodically making copies of everything ↓ ┆19┆┆89┆┄┄on the system, to guard against the accidental loss of ↓ ┆19┆┆89┆┄┄important programs and data. It also explains how to ↓ ┆19┆┆89┆┄┄format and copy floppy disks, and how to make copies of ↓ ┆19┆┆89┆┄┄user files from the hard disk to a floppy disk.↲ ↲ Section 6.7: Common System Problems↲ ┆84┆This section explains what to do if things do not run ↓ ┆19┆┆89┆┄┄smoothly. Instructions are provided for solving some ↓ ┆19┆┆89┆┄┄common system problems.↲ ↲ Appendix 6.A: XENIX Files and Directories↲ ┆84┆This appendix provides a roadmap to XENIX system files ↓ ┆19┆┆89┆┄┄and directories.↲ ↲ Appendix 6.B: The Multi-user System↲ ┆84┆This appendix explains some of the special problems of ↓ ┆19┆┆89┆┄┄an environment with multiple users or several XENIX ↓ ┆19┆┆89┆┄┄systems.↲ ↲ Appendix 6.C: Glossary↲ ┆84┆This appendix contains definitions of some common terms ↓ ┆19┆┆89┆┄┄relating to XENIX system operation.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.2 A First Look at XENIX↲ ↲ ┆84┆Once you have installed XENIX on you system, you are ↓ ┆19┆┆89┆┄┄ready to begin working. If you have never used a XENIX ↓ ┆19┆┆89┆┄┄system before, this section will introduce you to some ↓ ┆19┆┆89┆┄┄essential XENIX concepts, and teach you a few basic ↓ ┆19┆┆89┆┄┄commands. This information should be sufficient to get ↓ ┆19┆┆89┆┄┄you started as a system manager, but if you are planning ↓ ┆19┆┆89┆┄┄to use XENIX extensively, you should turn to the XENIX ↓ ┆19┆┆89┆┄┄Fundamentals manual for a full description of XENIX ↓ ┆19┆┆89┆┄┄commands and utilities. This section contains ↓ ┆19┆┆89┆┄┄information about:↲ ↲ . ┆84┆the use of your terminal keyboard↲ ↲ . ┆84┆the XENIX file and directory naming conventions and ↓ ┆19┆┆8b┆┄┄structure↲ ↲ . ┆84┆the XENIX shell and how to use XENIX commands↲ ↲ . the most commonly used XENIX commands↲ ↲ . the XENIX text editor, ed.↲ ↲ ↲ ┆b0┆┆a1┆6.2.1 A Word About Your XENIX System↲ ↲ ┆84┆This section will provide you with an overall ↓ ┆19┆┆89┆┄┄introduction to the use of the XENIX system. Even if you ↓ ┆19┆┆89┆┄┄have some experience working with microcomputer ↓ ┆19┆┆89┆┄┄operating systems, there are some aspects of XENIX you ↓ ┆19┆┆89┆┄┄may find unique. If you are a newcomer to the XENIX ↓ ┆19┆┆89┆┄┄System, or the UNIX operating system software from which ↓ ┆19┆┆89┆┄┄XENIX is derived, there are several special features of ↓ ┆19┆┆89┆┄┄the system you will want to become familiar with before ↓ ┆19┆┆89┆┄┄you begin working.↲ ↲ ┆84┆In many respects, using the XENIX system is like working ↓ ┆19┆┆89┆┄┄with a much larger computer. Although you have the ↓ ┆19┆┆89┆┄┄illusion that you are the only one working with the ↓ ┆19┆┆89┆┄┄system, XENIX is, in fact, a multi-user operating ↓ ┆19┆┆89┆┄┄system. That is, if your computer is equipped with extra ↓ ┆19┆┆89┆┄┄terminals and at least one hard disk drive, it will ↓ ┆19┆┆89┆┄┄support several users simultaneously. Normally, unless ↓ ┆19┆┆89┆┄┄you specify otherwise, you will not see any evidence of ↓ ┆19┆┆89┆┄┄other users' work at your terminal. On the other hand, ↓ ┆19┆┆89┆┄┄if you have only one terminal, the XENIX system still ↓ ┆19┆┆89┆┄┄provides individual user accounts and a facility for ↓ ┆19┆┆89┆┄┄restricting access to different users' files, to allow ↓ ┆19┆┆89┆┄┄for privacy and security. Procedures for creating user ↓ ┆19┆┆89┆┄┄accounts and setting permissions are described in ↓ ┆19┆┆89┆┄┄Section 6.4, "Controlling Access to Files and ↓ ┆19┆┆89┆┄┄Directories". Techniques for using these XENIX features ↓ ┆19┆┆89┆┄┄to your advantage are also presented.↲ ↲ ┆84┆The way in which the XENIX system orders the information ↓ ┆19┆┆89┆┄┄that you keep on the system is introduced in this ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄section. Your data is organized into files, which are ↓ ┆19┆┆89┆┄┄arranged hierarchically in system directories. This ↓ ┆19┆┆89┆┄┄gives the user great flexibility in organizing ↓ ┆19┆┆89┆┄┄information logically and efficiently.↲ ↲ ┆84┆Another way in which the XENIX system is unusual is its ↓ ┆19┆┆89┆┄┄capacity to allow you to do several things at once -- ↓ ┆19┆┆89┆┄┄compile programs, run application programs, edit and ↓ ┆19┆┆89┆┄┄process text files. This feature, referred to as multi-↓ ┆19┆┆89┆┄┄tasking, can be a powerful enhancement to your ↓ ┆19┆┆89┆┄┄productivity. In order to take full advantage of it, you ↓ ┆19┆┆89┆┄┄will want to learn as much as possible about the XENIX ↓ ┆19┆┆89┆┄┄shell, a command language which allows you to run ↓ ┆19┆┆89┆┄┄several processes simultaneously, write "scripts" for ↓ ┆19┆┆89┆┄┄doing complex sequences of tasks, and run programs while ↓ ┆19┆┆89┆┄┄leaving your terminal free for other work. An ↓ ┆19┆┆89┆┄┄introduction to XENIX shell features is provided later ↓ ┆19┆┆89┆┄┄on in this section.↲ ↲ ┆84┆Besides being an environment in which to run your own ↓ ┆19┆┆89┆┄┄application software, the XENIX system also offers a ↓ ┆19┆┆89┆┄┄wide range of system utilities, and specialized software ↓ ┆19┆┆89┆┄┄development and text processing software. This section ↓ ┆19┆┆89┆┄┄will only introduce you to a few of the most commonly ↓ ┆19┆┆89┆┄┄used XENIX commands, just to get you started with the ↓ ┆19┆┆89┆┄┄system. To learn more about your XENIX system, read the ↓ ┆19┆┆89┆┄┄XENIX Fundamentals manual.↲ ↲ ↲ ┆b0┆┆a1┆6.2.2 Some Preliminaries↲ ↲ ┆84┆Before you can work successfully with your XENIX system, ↓ ┆19┆┆89┆┄┄there are a few things you will have to know about how ↓ ┆19┆┆89┆┄┄to communicate with it. In particular, you will have to ↓ ┆19┆┆89┆┄┄know how to use the keys on your terminal keyboard, a ↓ ┆19┆┆89┆┄┄few rules about XENIX file naming conventions, and how ↓ ┆19┆┆89┆┄┄to correctly enter commands on the system so that you ↓ ┆19┆┆89┆┄┄can get XENIX to do what you want.↲ ↲ ↲ ┆b0┆┆a1┆6.2.2.1 Your Keyboard↲ ↲ ┆84┆First, let's take a brief look at your terminal ↓ ┆19┆┆89┆┄┄keyboard. In most respects, the keyboard of your ↓ ┆19┆┆89┆┄┄terminal is exactly like that of a typewriter. Most of ↓ ┆19┆┆89┆┄┄the letters, numerals, and punctuation marks are in the ↓ ┆19┆┆89┆┄┄same place, and you will quickly discover that the ↓ ┆19┆┆89┆┄┄"spacebar", "backspace", "repeat", and "shift" keys ↓ ┆19┆┆89┆┄┄behave in much the same way as they would on any ↓ ┆19┆┆89┆┄┄typewriter. However, there are a few differences you ↓ ┆19┆┆89┆┄┄should be aware of before you begin working. You may not ↓ ┆19┆┆89┆┄┄use keys that "look alike" interchangeably - the ↓ ┆19┆┆89┆┄┄uppercase letter "O" and zero, for example, or the ↓ ┆19┆┆89┆┄┄lowercase "l" and the number one (1). All computers will ↓ ┆19┆┆89┆┄┄recognize these as separate characters, so be sure you ↓ ┆19┆┆89┆┄┄always type the correct one.↲ ↲ ┆8c┆┆83┆┆c8┆↓ ┆84┆You should note that some of the keys on your keyboard ↓ ┆19┆┆89┆┄┄have a special meaning when you are using XENIX. These ↓ ┆19┆┆89┆┄┄include control-characters used to produce XENIX ↓ ┆19┆┆89┆┄┄characters that don't appear on your keyboard, and ↓ ┆19┆┆89┆┄┄various "escape" keys or sequences used to exit from ↓ ┆19┆┆89┆┄┄programs, terminate activities, log out, or stop the ↓ ┆19┆┆89┆┄┄movement of text on your screen.↲ ↲ ┆84┆Angle brackets (< >) are used in this chapter to ↓ ┆19┆┆89┆┄┄represent keys. Note that whenever you are asked to type ↓ ┆19┆┆89┆┄┄the <CONTROL> key along with some other key that you ↓ ┆19┆┆89┆┄┄should always press the <CONTROL> key first, and hold it ↓ ┆19┆┆89┆┄┄down while you type the second key, just as you would ↓ ┆19┆┆89┆┄┄hold down the shift key on a typewriter while typing the ↓ ┆19┆┆89┆┄┄letter you want to capitalize. Here is a list of the ↓ ┆19┆┆89┆┄┄most commonly used characters and sequences:↲ ↲ backslash ( ) ┆84┆The XENIX backslash ( ) character can be ↓ ┆19┆┆99┆┄┄obtained by typing <CONTROL-/> (or ↓ ┆19┆┆99┆┄┄Danish Ø).↲ ↲ pipe ( ) ┆84┆You will frequently have use for the ↓ ┆19┆┆99┆┄┄XENIX pipe ( ) character, and you will ↓ ┆19┆┆99┆┄┄certainly see it often in XENIX ↓ ┆19┆┆99┆┄┄documentation, although it does not ↓ ┆19┆┆99┆┄┄appear on your keyboard. It can be ↓ ┆19┆┆99┆┄┄entered by typing <CONTROL-1> (or Danish ↓ ┆19┆┆99┆┄┄ø).↲ ↲ <CONTROL-S> ┆84┆Typing the "control" and "s" keys ↓ ┆19┆┆99┆┄┄simultaneously will stop text from ↓ ┆19┆┆99┆┄┄"scrolling", that is, moving up and off ↓ ┆19┆┆99┆┄┄the screen. To start scrolling again, ↓ ┆19┆┆99┆┄┄type <CONTROL-Q>.↲ ↲ <CONTROL-D> ┆84┆You will have several important uses for ↓ ┆19┆┆99┆┄┄the <CONTROL-D> sequence:↲ ↲ - to log out↲ ↲ - ┆84┆to bring the system up from ↓ ┆19┆┆9b┆┄┄maintenance mode↲ ↲ - ┆84┆to exit from certain XENIX programs ↲ ↲ <BREAK> ┆84┆In addition to special uses it may have ↓ ┆19┆┆99┆┄┄in specific XENIX programs, the <BREAK> ↓ ┆19┆┆99┆┄┄key (RUBOUT or Danish SLET TEGN) will ↓ ┆19┆┆99┆┄┄interrupt any command you have entered ↓ ┆19┆┆99┆┄┄and return you to the system prompt ($).↲ ↲ <ENTER> ┆84┆In some documentation you may also see ↓ ┆19┆┆99┆┄┄this key named <RETURN>, for "carriage ↓ ┆19┆┆99┆┄┄return". You must type the <ENTER> or ↓ ┆19┆┆99┆┄┄<RETURN> key after a command for XENIX ↓ ┆19┆┆99┆┄┄to receive the instructions.↲ ↲ ↲ ┆8c┆┆83┆┆d0┆↓ ┆b0┆┆a1┆6.2.2.2 XENIX File and Directory Naming Conventions↲ ↲ ┆84┆As we will see later, all information on your system is ↓ ┆19┆┆89┆┄┄organized into files and directories. First, it is ↓ ┆19┆┆89┆┄┄important to learn a few rules about what you can name ↓ ┆19┆┆89┆┄┄these files and directories. All XENIX files and ↓ ┆19┆┆89┆┄┄directories may have names up to fourteen characters ↓ ┆19┆┆89┆┄┄long, including any combination of uppercase and ↓ ┆19┆┆89┆┄┄lowercase letters and numbers. You may not use the slash ↓ ┆19┆┆89┆┄┄(/) character, and you should also avoid using all ↓ ┆19┆┆89┆┄┄punctuation marks except the period (.) and special ↓ ┆19┆┆89┆┄┄characters, because they often have unexpected meanings ↓ ┆19┆┆89┆┄┄for XENIX.↲ ↲ ┆b0┆┆a1┆Wild Card Characters↲ ↲ ┆84┆Be especially cautious in your use of the two "wild ↓ ┆19┆┆89┆┄┄card" characters, question mark (?) and star (*). Wild ↓ ┆19┆┆89┆┄┄card characters are used to replace filenames or parts ↓ ┆19┆┆89┆┄┄of filenames. The question mark replaces a single ↓ ┆19┆┆89┆┄┄character; the star can replace several characters, or ↓ ┆19┆┆89┆┄┄even an entire name.↲ ↲ ┆84┆For example, to save typing you might refer to your file ↓ ┆19┆┆89┆┄┄┆a1┆chap2.s┆e1┆ as any of the following:↲ ↲ chap?.s *2.s *2*↲ ↲ ┆84┆If you wish to invoke a command involving several files, ↓ ┆19┆┆89┆┄┄you can use the "wild card" capability to process all of ↓ ┆19┆┆89┆┄┄them at once. So, if you wish to refer to all of your ↓ ┆19┆┆89┆┄┄chapters (e.g., chap1.s, chap2.s, etc.), you can just ↓ ┆19┆┆89┆┄┄type↲ ↲ *.s↲ ↲ ┆84┆to tell XENIX that you mean "all the files ending in .s" ↓ ┆19┆┆89┆┄┄or even use "*" alone to mean "every file". Of course, ↓ ┆19┆┆89┆┄┄if you are giving XENIX some command like "remove ↓ ┆19┆┆89┆┄┄files", you should be extremely careful about using ↓ ┆19┆┆89┆┄┄these wild card characters. The star can be used ↓ ┆19┆┆89┆┄┄anywhere in a filename, and can occur several times.↲ ↲ ┆b0┆┆a1┆Matching a Pattern Range↲ ↲ ┆84┆If you have used a consistent convention for naming ↓ ┆19┆┆89┆┄┄files - let's say with consecutive letters or numbers, ↓ ┆19┆┆89┆┄┄XENIX offers you the ability to name a group of files by ↓ ┆19┆┆89┆┄┄specifying a range. For example, suppose you want to ↓ ┆19┆┆89┆┄┄print only chapters 1 through 4, and 9. Then you can say ↲ ↲ pr chap 12349 *↲ ↲ ┆84┆The brackets ( and ) mean "match any of the characters ↓ ┆19┆┆89┆┄┄inside the brackets". A range of consecutive letters or ↓ ┆19┆┆89┆┄┄digits can be abbreviated, so you can also do this with↲ ↲ pr chap 1-49 *↲ ════════════════════════════════════════════════════════════════════════ ↓ ↲ ┆84┆(This does not match forty-nine filenames, but only ↓ ┆19┆┆89┆┄┄five.) Letters can also be used within brackets: " a-z " ↓ ┆19┆┆89┆┄┄matches any character in the range "a" through "z".↲ ↲ ┆b0┆┆a1┆Absolute and Relative Pathnames↲ ↲ ┆84┆XENIX files are grouped in directories and arranged ↓ ┆19┆┆89┆┄┄hierarchically. That is, a directory, which contains a ↓ ┆19┆┆89┆┄┄collection of files, may be a member of yet another ↓ ┆19┆┆89┆┄┄directory, and so forth. This results in the formation ↓ ┆19┆┆89┆┄┄of a tree with branches:↲ ↲ / (root directory)↲ ┆a1┆ ! ↲ ! ! ! !↲ etc bin dev usr↲ ! !↲ file1 fred↲ !↲ file1↲ file2↲ ↲ ┆84┆The "root" of this tree is the ┆a1┆root┆e1┆ directory, by ↓ ┆19┆┆89┆┄┄convention called "slash"(/). XENIX identifies files by ↓ ┆19┆┆89┆┄┄their "pathnames", the path you take along the branches ↓ ┆19┆┆89┆┄┄of this tree to arrive at the named file. The steps ↓ ┆19┆┆89┆┄┄along the way are separated by slashes (/). In the ↓ ┆19┆┆89┆┄┄diagram, for example, there are two files called ┆a1┆file1┆e1┆. ↓ ┆19┆┆89┆┄┄One of these is, in fact, /┆a1┆etc/file1┆e1┆. The other file is ↓ ┆19┆┆89┆┄┄/┆a1┆usr/fred/file1┆e1┆.↲ ↲ ┆84┆The XENIX file structure is discussed at greater length ↓ ┆19┆┆89┆┄┄in the next subsection. For now, however, it is ↓ ┆19┆┆89┆┄┄sufficient that you understand the "pathname" concept ↓ ┆19┆┆89┆┄┄when you work with directories and files. Every single ↓ ┆19┆┆89┆┄┄XENIX file and directory has both a filename and an ↓ ┆19┆┆89┆┄┄absolute "pathname", the route you would have to take to ↓ ┆19┆┆89┆┄┄reach the file from the root directory. The absolute ↓ ┆19┆┆89┆┄┄pathname is unique for each file in the system; ↓ ┆19┆┆89┆┄┄filenames are unique only within directories and need ↓ ┆19┆┆89┆┄┄not be unique system-wide. This is similar to someone ↓ ┆19┆┆89┆┄┄whose "absolute" name is John Robert Smith, but whom ↓ ┆19┆┆89┆┄┄everyone calls John. The name John need not be unique, ↓ ┆19┆┆89┆┄┄although it will greatly simplify life if John Robert ↓ ┆19┆┆89┆┄┄Smith is a unique name.↲ ↲ ┆84┆A pathname is a sequence of directory names followed by ↓ ┆19┆┆89┆┄┄a simple filename, each separated from the previous one ↓ ┆19┆┆89┆┄┄by a slash. If a pathname begins with a slash it is an ↓ ┆19┆┆89┆┄┄absolute pathname, that is, the search for the file ↓ ┆19┆┆89┆┄┄begins at the ┆a1┆root┆e1┆ of the entire tree. Otherwise, it ↓ ┆19┆┆89┆┄┄begins at the user's current, or "working" directory, ↓ ┆19┆┆89┆┄┄and is called a "relative" pathname, because it ↓ ┆19┆┆89┆┄┄specifies a path relative to the current directory.↲ ↲ ┆8c┆┆83┆┆c0┆↓ ┆84┆In most cases, a filename and its corresponding pathname ↓ ┆19┆┆89┆┄┄may be used interchangeably.↲ ↲ ┆b0┆┆a1┆Sample Names↲ ↲ ┆84┆Here are some samples of legitimate XENIX file and ↓ ┆19┆┆89┆┄┄directory names:↲ ↲ / ┆84┆The absolute pathname of the root ↓ ┆19┆┆9d┆┄┄directory of the entire file system.↲ ↲ /bin ┆84┆The directory containing most of the ↓ ┆19┆┆9d┆┄┄frequently used XENIX commands.↲ ↲ /usr ┆84┆The directory containing each user's ↓ ┆19┆┆9d┆┄┄personal directory. The ↓ ┆19┆┆9d┆┄┄subdirectory, /┆a1┆usr/bin┆e1┆ contains ↓ ┆19┆┆9d┆┄┄frequently used XENIX commands not ↓ ┆19┆┆9d┆┄┄in /┆a1┆bin┆e1┆.↲ ↲ /dev ┆84┆The directory containing files ↓ ┆19┆┆9d┆┄┄corresponding to each available ↓ ┆19┆┆9d┆┄┄physical device (e.g., terminals, ↓ ┆19┆┆9d┆┄┄lineprinters, and disks).↲ ↲ /lib ┆84┆The directory containing special ↓ ┆19┆┆9d┆┄┄data files used by some standard ↓ ┆19┆┆9d┆┄┄commands.↲ ↲ /tmp ┆84┆This directory contains temporary ↓ ┆19┆┆9d┆┄┄scratch files.↲ ↲ /usr/joe/project/A ┆84┆This is a typical full pathname. ↓ ┆19┆┆9d┆┄┄This one happens to be a file named ↓ ┆19┆┆9d┆┄┄┆a1┆A┆e1┆ in the directory named ┆a1┆project┆e1┆ ↓ ┆19┆┆9d┆┄┄belonging to the user named ┆a1┆joe┆e1┆.↲ ↲ bin/x ┆84┆A relative pathname; it names the ↓ ┆19┆┆9d┆┄┄file ┆a1┆x┆e1┆ in subdirectory ┆a1┆bin┆e1┆ of the ↓ ┆19┆┆9d┆┄┄current working directory. If the ↓ ┆19┆┆9d┆┄┄current directory is /, it names ↓ ┆19┆┆9d┆┄┄/┆a1┆bin/x┆e1┆. If the current directory is ↓ ┆19┆┆9d┆┄┄/┆a1┆usr/joe┆e1┆, it names /┆a1┆usr/joe/bin/x┆e1┆.↲ ↲ file1 ┆84┆Name of an ordinary file in the ↓ ┆19┆┆9d┆┄┄current directory.↲ ↲ ┆b0┆┆a1┆Two Special Shorthand Names↲ ↲ ┆84┆Each user resides "in" a directory called the current ↓ ┆19┆┆89┆┄┄directory. All files and directories have a "parent" ↓ ┆19┆┆89┆┄┄directory, which is the one immediately above and ↓ ┆19┆┆89┆┄┄"containing" the given file or directory. The XENIX file ↓ ┆19┆┆89┆┄┄system provides special shorthand notations for this ↓ ┆19┆┆89┆┄┄directory and for the current directory:↲ ↲ ┆8c┆┆83┆┆c0┆↓ . ┆84┆The shorthand name of the current directory. Thus ↓ ┆19┆┆8c┆┄┄./┆a1┆filexxx┆e1┆ names the same file as ┆a1┆filexxx┆e1┆, if such a ↓ ┆19┆┆8c┆┄┄file exists in the current directory.↲ ↲ .. ┆84┆The shorthand name of the current directory's parent ↓ ┆19┆┆8c┆┄┄directory. For example, if you use the XENIX command, ↓ ┆19┆┆8c┆┄┄cd, which changes your directory to the one you name:↲ ↲ cd ..↲ ↲ ┆84┆you would be changing to the directory called "..", ↓ ┆19┆┆8c┆┄┄the parent of the directory you were in before.↲ ↲ ↲ ┆b0┆┆a1┆6.2.2.3 How to Use XENIX Commands↲ ↲ ┆84┆A XENIX command may be typed whenever the prompt ↓ ┆19┆┆89┆┄┄appears, indicating that you are in the "shell", the ↓ ┆19┆┆89┆┄┄command level of the system. This prompt will either be ↓ ┆19┆┆89┆┄┄a dollar sign ($) or a number sign ( ). XENIX commands ↓ ┆19┆┆89┆┄┄generally consist of single lowercase words, which may ↓ ┆19┆┆89┆┄┄be followed by one or more "switches" and "arguments". ↓ ┆19┆┆89┆┄┄Most often the argument will be a filename. Every ↓ ┆19┆┆89┆┄┄command must be followed by typing <ENTER>, even though ↓ ┆19┆┆89┆┄┄this is not noted specifically in most text examples.↲ ↲ ┆84┆To take a simple example, you can use the command cat to ↓ ┆19┆┆89┆┄┄look at the contents of a file. If you type↲ ↲ $ cat file1↲ ↲ ┆84┆the contents of ┆a1┆file1┆e1┆ will appear on your screen.↲ ↲ ┆84┆To use another example, the command lc lists the ↓ ┆19┆┆89┆┄┄contents of whatever directory you name. Therfore,↲ ↲ $ lc /usr/fred↲ ↲ ┆84┆will give you a list of files and directories in the ↓ ┆19┆┆89┆┄┄directory /┆a1┆usr/fred┆e1┆. One thing to note: When you type ↓ ┆19┆┆89┆┄┄XENIX commands, be sure to include or omit spaces ↓ ┆19┆┆89┆┄┄exactly as indicated; it is best to think of the "space" ↓ ┆19┆┆89┆┄┄as a character like any other.↲ ↲ ┆84┆Whether you are typing at the terminal, or executing ↓ ┆19┆┆89┆┄┄commands from a file, XENIX always reads commands from ↓ ┆19┆┆89┆┄┄command lines. The command line is a line of characters ↓ ┆19┆┆89┆┄┄that is scanned and read by the shell command ↓ ┆19┆┆89┆┄┄interpreter to determine what to do next. You must type ↓ ┆19┆┆89┆┄┄<ENTER> at the end of every command - the command will ↓ ┆19┆┆89┆┄┄not be submitted until you do. If you make a mistake ↓ ┆19┆┆89┆┄┄while typing a line, you can use either the <BKSP> or ↓ ┆19┆┆89┆┄┄<CONTROL-U> keys. The XENIX shell then reads the command ↓ ┆19┆┆89┆┄┄line and executes the appropriate command. If you type ↓ ┆19┆┆89┆┄┄<INTERRUPT> before you have typed <ENTER>, the command ↓ ┆19┆┆89┆┄┄is aborted.↲ ↲ ┆8c┆┆83┆┆c8┆↓ ┆84┆When you type a command, you are actually invoking a ↓ ┆19┆┆89┆┄┄program. In XENIX, a program is a file, which has an ↓ ┆19┆┆89┆┄┄executable status. The XENIX shell looks for a program ↓ ┆19┆┆89┆┄┄with the command name and executes it. Some commands may ↓ ┆19┆┆89┆┄┄also contain "switches" - these specify options or other ↓ ┆19┆┆89┆┄┄arguments as needed by the program. Multiple commands ↓ ┆19┆┆89┆┄┄can be entered on a single command line so long as they ↓ ┆19┆┆89┆┄┄are separated by a semicolon (;). For example, the ↓ ┆19┆┆89┆┄┄following prints out the current date and the name of ↓ ┆19┆┆89┆┄┄the current working directory:↲ ↲ date ; pwd↲ ↲ ┆84┆Two XENIX commands date, and pwd, are joined on a single ↓ ┆19┆┆89┆┄┄line with the semicolon.↲ ↲ ┆84┆Commands can be submitted for processing in the ↓ ┆19┆┆89┆┄┄background by putting an ampersand (&) at the end of the ↓ ┆19┆┆89┆┄┄command. This leaves your terminal free. You can execute ↓ ┆19┆┆89┆┄┄other commands from your terminal while the first ↓ ┆19┆┆89┆┄┄command executes in the background. This is a special ↓ ┆19┆┆89┆┄┄feature of the XENIX shell to facilitate multi-tasking - ↓ ┆19┆┆89┆┄┄the capacity to do more than one task at once.↲ ↲ Commands have the following general syntax:↲ ↲ cmd ┆a1┆switches┆e1┆ ┆a1┆argument┆e1┆┆a1┆s┆e1┆ ┆a1┆filenames┆e1┆ ↲ ↲ ┆84┆In practically all cases, command names are all ↓ ┆19┆┆89┆┄┄lowercase. Switches are added options available when ↓ ┆19┆┆89┆┄┄executing the command. They always precede other ↓ ┆19┆┆89┆┄┄arguments and filenames. Switches consist of a dash ↓ ┆19┆┆89┆┄┄prefix (-) and an identifying letter or number. Some ↓ ┆19┆┆89┆┄┄switches are also prefixed by a plus sign (+). Switches ↓ ┆19┆┆89┆┄┄can often be grouped as a single switch as in:↲ ↲ ls -arl↲ ↲ ┆84┆which invokes the -a, -r, and -1 switches simultanously. ↓ ┆19┆┆89┆┄┄Sometimes, however, switches must be invoked separately.↲ ↲ ┆84┆There are various types of arguments. An argument may be ↓ ┆19┆┆89┆┄┄a string of text, as in:↲ ↲ grep 'string of text' outfile↲ ↲ ┆84┆In the above example, "string of text" is an argument; ↓ ┆19┆┆89┆┄┄it is the string of text that the grep command searches ↓ ┆19┆┆89┆┄┄for in the file ┆a1┆outfile┆e1┆. ┆a1┆Outfile┆e1┆ is a filename argument ↓ ┆19┆┆89┆┄┄that specifies the name of a file required by the ↓ ┆19┆┆89┆┄┄command.↲ ↲ ↲ ┆b0┆┆a1┆6.2.3 Files and Directories↲ ↲ ┆84┆XENIX stores information on the computer in "files", in ↓ ┆19┆┆89┆┄┄much the same way as you might store an important memo ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄or record in a file folder. Computer files may contain ↓ ┆19┆┆89┆┄┄various types of information, such as the text of a ↓ ┆19┆┆89┆┄┄document, a program, or lines of data, but they are all ↓ ┆19┆┆89┆┄┄treated in the same way. Furthermore, XENIX gives you ↓ ┆19┆┆89┆┄┄the option of collecting groups of files in ↓ ┆19┆┆89┆┄┄"directories", much as you might organize file folders ↓ ┆19┆┆89┆┄┄into categories and put them in labeled file drawers so ↓ ┆19┆┆89┆┄┄that they can be found easily. The organization of XENIX ↓ ┆19┆┆89┆┄┄files and directories is quite flexible. You will soon ↓ ┆19┆┆89┆┄┄find that your decisions about what to name files and ↓ ┆19┆┆89┆┄┄where you decide to put them can make your work on the ↓ ┆19┆┆89┆┄┄system more efficient, just as you would expect to be ↓ ┆19┆┆89┆┄┄able to do your work faster in an office where you could ↓ ┆19┆┆89┆┄┄find all your important records quickly.↲ ↲ ↲ ┆b0┆┆a1┆6.2.3.1 The Hierarchy of Files and Directories↲ ↲ ┆84┆It is important to emphasize here that XENIX files and ↓ ┆19┆┆89┆┄┄directories can be organized hierarchically. That is, ↓ ┆19┆┆89┆┄┄each XENIX directory can contain other directories, as ↓ ┆19┆┆89┆┄┄well as files, and those directories can also contain ↓ ┆19┆┆89┆┄┄directories. Therefore, you can create a pyramid of ↓ ┆19┆┆89┆┄┄directories within directories.↲ ↲ ┆84┆To take a simple example, in Subsection 6.3.2 ┆a1┆┆e1┆John Doe┆e1┆ ↓ ┆19┆┆89┆┄┄is added to the system with the mkuser program. One of ↓ ┆19┆┆89┆┄┄the things that the mkuser program does is to give John ↓ ┆19┆┆89┆┄┄a work space of his own, a "home" directory, called ↓ ┆19┆┆89┆┄┄/┆a1┆usr/johnd┆e1┆. Now you can see that the directory ┆a1┆johnd┆e1┆ is, ↓ ┆19┆┆89┆┄┄in fact, a subdirectory of another directory called ┆a1┆usr┆e1┆, ↓ ┆19┆┆89┆┄┄which contains the home directories of all the users on ↓ ┆19┆┆89┆┄┄the system. Undoubtedly, as soon as John logs in to the ↓ ┆19┆┆89┆┄┄system for the first time he will begin to create new ↓ ┆19┆┆89┆┄┄files and directories to store his work in.↲ ↲ ┆84┆Let's say he creates a directory called ┆a1┆payroll┆e1┆ in which ↓ ┆19┆┆89┆┄┄to put various payroll programs and data files, and ↓ ┆19┆┆89┆┄┄another called ┆a1┆memos┆e1┆ in which to store important pieces ↓ ┆19┆┆89┆┄┄of electronic mail he receives from other users on the ↓ ┆19┆┆89┆┄┄system. Perhaps he will also create a simple file for ↓ ┆19┆┆89┆┄┄himself right in his home directory called ┆a1┆list┆e1┆, which ↓ ┆19┆┆89┆┄┄contains a list of things to do. The results would look ↓ ┆19┆┆89┆┄┄like this (directories are indicated in brackets):↲ ↲ / ↲ !↲ usr ↲ !↲ johnd ↲ ┆a1┆ ! ↲ ! ! !↲ memos payroll list↲ file1 file1 ↲ file2 file2↲ program↲ ↲ ↲ ┆8c┆┆83┆┆d0┆↓ ┆b0┆┆a1┆6.2.3.2 File Manipulation Commands↲ ↲ ┆84┆At this point, you will need to learn a few XENIX ↓ ┆19┆┆89┆┄┄commands for creating, moving, copying and deleting ↓ ┆19┆┆89┆┄┄files and directories. To create the ┆a1┆memos┆e1┆ directory, ↓ ┆19┆┆89┆┄┄for example, John Doe had to type↲ ↲ $ mkdir memos↲ ↲ ┆84┆Now, in order to make the ┆a1┆memos┆e1┆ directory his "current" ↓ ┆19┆┆89┆┄┄or working directory, he would need to type:↲ ↲ $ cd /usr/johnd/memos↲ ↲ ┆84┆The command cd stands for "change directory". He is now ↓ ┆19┆┆89┆┄┄in the directory ┆a1┆memos┆e1┆ or, to give its full pathname, or ↓ ┆19┆┆89┆┄┄location, /┆a1┆usr/johnd/memos┆e1┆. To create a new file, type ↓ ┆19┆┆89┆┄┄the character ">", followed by the filename: Let's say ↓ ┆19┆┆89┆┄┄John wants to create a new file in his ┆a1┆memos┆e1┆ directory ↓ ┆19┆┆89┆┄┄called ┆a1┆newproject┆e1┆:↲ ↲ >newproject↲ ↲ ┆84┆There is now a file in the ┆a1┆memos┆e1┆ directory called ↓ ┆19┆┆89┆┄┄┆a1┆newproject┆e1┆. The lc command lists the contents of the ↓ ┆19┆┆89┆┄┄current directory:↲ ↲ file1 newproject↲ file2↲ ↲ ┆84┆Files can be moved and copied from one directory to ↓ ┆19┆┆89┆┄┄another. Suppose John wishes to move the file ↓ ┆19┆┆89┆┄┄┆a1┆newproject┆e1┆ to a new directory created for his new ↓ ┆19┆┆89┆┄┄project, ┆a1┆acct.proj┆e1┆. First, he can create ┆a1┆acct.proj┆e1┆ ↓ ┆19┆┆89┆┄┄with the mkdir command, and then he can move the ↓ ┆19┆┆89┆┄┄┆a1┆newproject┆e1┆ file from the ┆a1┆memos┆e1┆ directory to the ↓ ┆19┆┆89┆┄┄┆a1┆acct.proj┆e1┆ directory with the mv command, as in:↲ ↲ mv newproject /usr/johnd/acct.proj↲ ↲ If he uses↲ ↲ cd /usr/johnd/acct.proj↲ ↲ ┆84┆to move himself into the ┆a1┆acct.proj┆e1┆ directory, and uses ↓ ┆19┆┆89┆┄┄the lc command, the ┆a1┆newproject┆e1┆ file will appear in the ↓ ┆19┆┆89┆┄┄list of files in the ┆a1┆acct.proj┆e1┆ directory. When XENIX ↓ ┆19┆┆89┆┄┄moves a file, it removes it from the old directory and ↓ ┆19┆┆89┆┄┄puts the file in the new one. If John wished to keep a ↓ ┆19┆┆89┆┄┄copy of ┆a1┆newproject┆e1┆ in the old ┆a1┆memos┆e1┆ directory, thus ↓ ┆19┆┆89┆┄┄making ┆a1┆newproject┆e1┆ a file in both directories, he could ↓ ┆19┆┆89┆┄┄use the cp command to create another identical ↓ ┆19┆┆89┆┄┄┆a1┆newproject┆e1┆ file in the other directory. Note that XENIX ↓ ┆19┆┆89┆┄┄allows you to have two files of the same name, as long ↓ ┆19┆┆89┆┄┄as they are in different directories.↲ ↲ ┆8c┆┆83┆┆c0┆↓ ┆84┆If you no longer need a file, just use the rm command to ↓ ┆19┆┆89┆┄┄remove it. The command↲ ↲ $rm newproject↲ ↲ ┆84┆removes the file ┆a1┆newproject┆e1┆ from the directory. Once ↓ ┆19┆┆89┆┄┄again, this can be verified with the lc command. ↓ ┆19┆┆89┆┄┄Similarly, you can remove an entire directory by using ↓ ┆19┆┆89┆┄┄the command rmdir as in↲ ↲ $rmdir memos↲ ↲ ┆84┆However, XENIX will not allow you to remove a directory ↓ ┆19┆┆89┆┄┄without first removing all of the files in it. You can ↓ ┆19┆┆89┆┄┄type either↲ ↲ $rm file1 file2 newproject↲ ↲ ┆84┆or, using a special XENIX character, the star (*), which ↓ ┆19┆┆89┆┄┄stands for everything, enter↲ ↲ $rm *↲ ↲ ┆84┆Be cautious about using the star; it really will remove ↓ ┆19┆┆89┆┄┄everything. Also, you cannot be in the directory you are ↓ ┆19┆┆89┆┄┄removing, so move back to the directory above it. XENIX ↓ ┆19┆┆89┆┄┄even lets you type two commands together, if you ↓ ┆19┆┆89┆┄┄separate them with a semicolon (;).↲ ↲ $cd /usr/johnd;rmdir memos↲ ↲ ┆84┆As you work more with the XENIX system, you will want to ↓ ┆19┆┆89┆┄┄know a great deal more about these and other commands to ↓ ┆19┆┆89┆┄┄manipulate files and directories. Read whatever XENIX ↓ ┆19┆┆89┆┄┄documentation you have available for a more detailed ↓ ┆19┆┆89┆┄┄discussion of the XENIX file structure, and practice ↓ ┆19┆┆89┆┄┄using these commands until you are comfortable with ↓ ┆19┆┆89┆┄┄them.↲ ↲ ↲ ┆b0┆┆a1┆6.2.4 The XENIX Shell↲ ↲ ┆84┆The XENIX shell is your interface with the system. Every ↓ ┆19┆┆89┆┄┄time you log in to XENIX you are, in fact, invoking a ↓ ┆19┆┆89┆┄┄"shell" - this shell speaks a command language which ↓ ┆19┆┆89┆┄┄allows you to specify input and output, run several ↓ ┆19┆┆89┆┄┄processes simultaneously by placing them in the ↓ ┆19┆┆89┆┄┄background, or link two processes together, by ↓ ┆19┆┆89┆┄┄connecting the output of one process to the input of ↓ ┆19┆┆89┆┄┄another.↲ ↲ ┆84┆The XENIX shell has many of the features of a ↓ ┆19┆┆89┆┄┄programming language, and allows you to prepare complex ↓ ┆19┆┆89┆┄┄scripts to run long sequences of processes. Techniques ↓ ┆19┆┆89┆┄┄for using the shell as a powerful aid to your ↓ ┆19┆┆89┆┄┄productivity on the system are introduced in detail in ↓ ┆19┆┆89┆┄┄the XENIX Fundamentals manual.↲ ↲ ↲ ┆8c┆┆83┆┆d8┆↓ ┆b0┆┆a1┆6.2.4.1 Controlling Input and Output↲ ↲ ┆84┆XENIX handles input and output from commands in a unique ↓ ┆19┆┆89┆┄┄way: it assumes that input and output are associated ↓ ┆19┆┆89┆┄┄with the terminal from which the command originates. ↓ ┆19┆┆89┆┄┄That is, input comes from the keyboard and output goes ↓ ┆19┆┆89┆┄┄to the terminal screen. To illustrate typical command ↓ ┆19┆┆89┆┄┄input and output, type:↲ ↲ cat↲ ↲ ┆84┆This command now expects input from your keyboard. It ↓ ┆19┆┆89┆┄┄will accept as many lines of text as you can type as ↓ ┆19┆┆89┆┄┄input, until you type a <CONTROL-D> as an end-of-file ↓ ┆19┆┆89┆┄┄indicator. For example, type:↲ ↲ this is two lines↲ of input↲ <CONTROL-D>↲ ↲ ┆84┆When you type the <CONTROL-D>, input ends and output ↓ ┆19┆┆89┆┄┄begins. The cat command then immediately outputs the two ↓ ┆19┆┆89┆┄┄lines that you typed. Since output is sent to the ↓ ┆19┆┆89┆┄┄terminal screen by default, that is where the two lines ↓ ┆19┆┆89┆┄┄are sent. Thus, the complete session will look like this ↓ ┆19┆┆89┆┄┄on your terminal screen:↲ ↲ $cat↲ this is two lines↲ of input↲ this is two lines↲ of input↲ $↲ ↲ ┆84┆However, you can specify that input and/or output be ↓ ┆19┆┆89┆┄┄"redirected". Input may come from a file instead of from ↓ ┆19┆┆89┆┄┄the terminal keyboard, and output may be directed to a ↓ ┆19┆┆89┆┄┄file or to a lineprinter, instead of to the terminal ↓ ┆19┆┆89┆┄┄screen. Also, you can create "pipes" to allow the output ↓ ┆19┆┆89┆┄┄from one command to become the input to another.↲ ↲ ↲ ┆b0┆┆a1┆6.2.4.2 Redirection↲ ↲ ┆84┆Instead of having your input come directly from the ↓ ┆19┆┆89┆┄┄terminal, or watching the output of some process come to ↓ ┆19┆┆89┆┄┄your screen, you can ask XENIX to take a file you ↓ ┆19┆┆89┆┄┄specify as input, and output the results of the process ↓ ┆19┆┆89┆┄┄into another file. In XENIX, a file can replace the ↓ ┆19┆┆89┆┄┄terminal for either input or output. For example, the ↓ ┆19┆┆89┆┄┄command↲ ↲ ls↲ ↲ ┆84┆displays a list of files in your current directory on ↓ ┆19┆┆89┆┄┄your terminal screen. But if you say↲ ↲ ls >filelist↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆84┆a list of your files is placed in the file ┆a1┆filelist┆e1┆. If ↓ ┆19┆┆89┆┄┄a file called ┆a1┆filelist┆e1┆ does not exist, XENIX will create ↓ ┆19┆┆89┆┄┄it. The output redirection symbol (>) means "put the ↓ ┆19┆┆89┆┄┄output from the command into the following file, rather ↓ ┆19┆┆89┆┄┄than display it on the terminal screen".↲ ↲ ┆84┆You can also combine several files into one, using the ↓ ┆19┆┆89┆┄┄cat command:↲ ↲ cat f1 f2 f3 >temp↲ ↲ ┆84┆This command says "take the contents of these three ↓ ┆19┆┆89┆┄┄files and put them all into a file called ┆a1┆temp┆e1┆".↲ ↲ ┆84┆The output append symbol (>>) works in much the same way ↓ ┆19┆┆89┆┄┄as output redirection, except that it means "add to the ↓ ┆19┆┆89┆┄┄end of". That is↲ ↲ cat file1 file2 file3 >>temp↲ ↲ ┆84┆means to concatenate ┆a1┆file1┆e1┆, ┆a1┆file2┆e1┆, and ┆a1┆file3┆a1┆┆e1┆ to the end ↓ ┆19┆┆89┆┄┄of whatever is already in ┆a1┆temp┆e1┆. Thus, if you already had ↓ ┆19┆┆89┆┄┄information in the file called ┆a1┆temp┆e1┆, instead of ↓ ┆19┆┆89┆┄┄replacing the old contents of ┆a1┆temp┆e1┆ with the contents of ↓ ┆19┆┆89┆┄┄┆a1┆file1┆e1┆, ┆a1┆file2┆e1┆, and ┆a1┆file3┆e1┆, these three files will be ↓ ┆19┆┆89┆┄┄placed at the end of the old file called ┆a1┆temp┆e1┆ instead. ↓ ┆19┆┆89┆┄┄As with normal output redirection, if ┆a1┆temp┆e1┆ doesn't ↓ ┆19┆┆89┆┄┄exist, it is created for you.↲ ↲ ╱04002f4e0a0006000000000201413140000000000000000000000000000000000000000000000000050f19232d37414b555f69737d8791ff04╱ ╱0400274e0c0006000000000201483160000000000000000000000000000000000000000000000000050a0f14191e23282d32373c41464bff04╱ ↓ ┆84┆The input redirection symbol (<) means to take the input ↓ ┆19┆┆89┆┄┄for a program from the following file, instead of from ↓ ┆19┆┆89┆┄┄the terminal. This allows you to make up a script of ↓ ┆19┆┆89┆┄┄editing commands and put them into a file called ┆a1┆script┆e1┆. ↓ ┆19┆┆89┆┄┄Then you could execute the commands in the script on a ↓ ┆19┆┆89┆┄┄file using the XENIX editor by typing:↲ ↲ ed file <script↲ ↲ ┆84┆As another example, you could use ed to prepare a letter ↓ ┆19┆┆89┆┄┄in file ┆a1┆letter.txt┆e1┆, then send it to several people with↲ ↲ mail adam eve mary joe <letter.txt↲ ↲ ↲ ┆b0┆┆a1┆6.2.4.3 Pipes↲ ↲ ┆84┆Pipes are a unique feature of the XENIX system. A pipe ↓ ┆19┆┆89┆┄┄is simply a way to connect the output of one command to ↓ ┆19┆┆89┆┄┄the input of another command, so that the two run as a ↓ ┆19┆┆89┆┄┄sequence of commands called a pipeline.↲ ↲ For example↲ ↲ ╞ pr memo1 memo2 memo3↲ ↲ ┆84┆prints the files named ┆a1┆memo1┆e1┆, ┆a1┆memo2┆e1┆, and ┆a1┆memo3┆e1┆, ↓ ┆19┆┆89┆┄┄beginning each on a new page. Suppose you want them run ↓ ┆19┆┆89┆┄┄together instead. You could type:↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ cat memo1 memo2 memo3>temp↲ pr <temp↲ rm temp↲ ↲ ┆84┆to put the contents of the three memo files into a new ↓ ┆19┆┆89┆┄┄file called ┆a1┆temp┆e1┆, print it, then remove. However, it is ↓ ┆19┆┆89┆┄┄quite a bit simpler to take the output of cat and ↓ ┆19┆┆89┆┄┄connect it to the input of pr, using a pipe:↲ ↲ cat memo1 memo2 memo3 pr↲ ↲ ┆84┆The vertical bar ( ) means to take the output from cat, ↓ ┆19┆┆89┆┄┄which would normally have gone to the terminal, and put ↓ ┆19┆┆89┆┄┄it into pr to be formatted.↲ ↲ ┆84┆There are many other examples of pipes. For example,↲ ↲ ls pr -3↲ ↲ ┆84┆prints a list of your files in three columns. The ↓ ┆19┆┆89┆┄┄program wc counts the number of lines, words, and ↓ ┆19┆┆89┆┄┄characters in its input, and who prints a list of all ↓ ┆19┆┆89┆┄┄the users currently logged in, one per line. Thus,↲ ↲ who wc↲ ↲ tells how many people are logged in. And of course↲ ↲ ls wc↲ ↲ counts your files.↲ ↲ ┆84┆Any program that reads from the terminal keyboard can ↓ ┆19┆┆89┆┄┄read from a pipe instead. Any program that displays ↓ ┆19┆┆89┆┄┄output to the terminal screen can send input to a pipe. ↓ ┆19┆┆89┆┄┄You can have as many elements in a pipeline as you wish.↲ ↲ ┆84┆Many XENIX programs are written so that they take their ↓ ┆19┆┆89┆┄┄input from one or more files, if file arguments are ↓ ┆19┆┆89┆┄┄given. If no arguments are given, they read from the ↓ ┆19┆┆89┆┄┄terminal keyboard, and thus can be used in pipelines. ↓ ┆19┆┆89┆┄┄For example↲ ↲ pr 3 albert.txt bernard.txt carl.txt↲ ↲ ┆84┆prints, in order, the files ┆a1┆albert.text┆e1┆, ┆a1┆bernard.txt┆e1┆, ↓ ┆19┆┆89┆┄┄and ┆a1┆carl.txt┆e1┆. But in↲ ↲ cat albert.txt bernard.txt carl.txt pr↲ ↲ ┆84┆pr prints the concatenation of these files coming down ↓ ┆19┆┆89┆┄┄the pipeline. The difference is that here, ┆a1┆albert.txt┆e1┆, ↓ ┆19┆┆89┆┄┄┆a1┆bernard.txt┆e1┆, and ┆a1┆carl.txt┆e1┆ are run together and then ↓ ┆19┆┆89┆┄┄treated as one file rather than three.↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.2.5 Frequently Used Commands↲ ↲ ┆84┆In this subsection, some common XENIX commands are ↓ ┆19┆┆89┆┄┄summarized. You will find these descriptions of ↓ ┆19┆┆89┆┄┄immediate use to you while you are just getting started ↓ ┆19┆┆89┆┄┄using your XENIX system. However, as you learn more ↓ ┆19┆┆89┆┄┄about the system, you should read the XENIX Fundamentals ↓ ┆19┆┆89┆┄┄manual, which is a complete introduction to the use of ↓ ┆19┆┆89┆┄┄the XENIX system. The commands listed here represent ↓ ┆19┆┆89┆┄┄three types of activities:↲ ↲ . ┆84┆logging in and out, using your terminal and ↓ ┆19┆┆8b┆┄┄lineprinter, and dealing with processes running on the ↓ ┆19┆┆8b┆┄┄system↲ ↲ . ┆84┆manipulating files, directories, and your position in ↓ ┆19┆┆8b┆┄┄the file hierarchy↲ ↲ . using some basic system utilities↲ ↲ ┆84┆Where possible, try each of these commands out as you ↓ ┆19┆┆89┆┄┄read about them. There is no substitute for practice.↲ ↲ ┆b0┆Logging In↲ ↲ ┆84┆To gain access to the system, respond to the "login:" ↓ ┆19┆┆89┆┄┄prompt by typing your account name followed by <ENTER>. ↓ ┆19┆┆89┆┄┄Then respond to the ┆a1┆password┆e1┆: prompt with your password. ↓ ┆19┆┆89┆┄┄For example, a login for the user ┆a1┆joe┆e1┆ might look like ↓ ┆19┆┆89┆┄┄this:↲ ↲ login:joe↲ password:abracadabra↲ ↲ ┆84┆The password will NOT appear on the terminal screen as ↓ ┆19┆┆89┆┄┄you type it.↲ ↲ ↲ ┆b0┆┆a1┆6.2.5.1 Commands for Using Your Terminal and Lineprinter↲ ↲ ┆b0┆Logging Out↲ ↲ ┆84┆The logout procedure is simple - all you need to do is ↓ ┆19┆┆89┆┄┄type:↲ ↲ <CONTROL-D>↲ ↲ ┆84┆Since within other programs, <CONTROL-D> signifies the ↓ ┆19┆┆89┆┄┄end-of-file to the system, at times it may be necessary ↓ ┆19┆┆89┆┄┄to type <CONTROL-D> several times before you can log ↓ ┆19┆┆89┆┄┄yourself out.↲ ↲ ┆b0┆Changing Your Password↲ ↲ ┆84┆To change your password, use the passwd command. The ↓ ┆19┆┆89┆┄┄passwd command will prompt you twice for the answer. For ↓ ┆19┆┆89┆┄┄the user joe, a session might go like this:↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ Changing password for joe↲ Old password:abracadabra↲ New password: Bazookah↲ Retype new password: Bazookah↲ ↲ ┆84┆To maintain security, ┆a1┆┆e1┆your responses are NOT shown on ↓ ┆19┆┆89┆┄┄the screen┆e1┆. It is best to mix uppercase and lowercase ↓ ┆19┆┆89┆┄┄letters and make the password greater than five ↓ ┆19┆┆89┆┄┄characters in length.↲ ↲ ┆b0┆Setting Terminal Options↲ ↲ ┆84┆There are a number of terminal options that can be set ↓ ┆19┆┆89┆┄┄with the command stty. When entered without parameters, ↓ ┆19┆┆89┆┄┄stty displays the current terminal settings. For ↓ ┆19┆┆89┆┄┄example, typical output might look like this:↲ ↲ speed 9600 baud↲ erase ' h' ; kill ' u'↲ even -nl↲ ↲ ┆84┆This says that the rate of data transmission to and from ↓ ┆19┆┆89┆┄┄the terminal is 9600 baud, that the backspace character ↓ ┆19┆┆89┆┄┄(erase) is <CONTROL-H>, that the line kill character is ↓ ┆19┆┆89┆┄┄<CONTROL-U>, that even parity is set, and that <ENTER> ↓ ┆19┆┆89┆┄┄signifies the beginning of a new line. Each of the above ↓ ┆19┆┆89┆┄┄characteristics can be set by using the stty command, or ↓ ┆19┆┆89┆┄┄with entries in a special file called .┆a1┆profile┆e1┆. (See ↓ ┆19┆┆89┆┄┄Section 6.3, "Getting the System Ready for Your Users".)↲ ↲ ┆b0┆Changing Terminals↲ ↲ ┆84┆If you have to log in to XENIX on a terminal of a type ↓ ┆19┆┆89┆┄┄different than the terminal you normally use, you may ↓ ┆19┆┆89┆┄┄need to change the shell TERM variable. This is normally ↓ ┆19┆┆89┆┄┄set to the proper default terminal when you log in, but ↓ ┆19┆┆89┆┄┄if you switch terminals, you'll need to type something ↓ ┆19┆┆89┆┄┄like:↲ ↲ TERM=┆a1┆termname┆e1┆; export TERM↲ ↲ ┆84┆where ┆a1┆termname┆e1┆ is the name of a know terminal. A wide ↓ ┆19┆┆89┆┄┄variety of terminals are supported; terminal names are ↓ ┆19┆┆89┆┄┄listed in the system file named /┆a1┆etc/termcap┆e1┆. (See ↓ ┆19┆┆89┆┄┄Appendix 6.B, "Notes on the Multi-user System").↲ ↲ ┆b0┆Erasing a Command Line↲ ↲ ┆84┆If you make a mistake while typing a command line, you ↓ ┆19┆┆89┆┄┄can erase the current line and retype a new one. Enter a ↓ ┆19┆┆89┆┄┄<CONTROL-U>, as shown below:↲ ↲ kat file2<CONTROL-U>↲ cat file1↲ ↲ ┆84┆In this case, the first line is aborted and a newline is ↓ ┆19┆┆89┆┄┄generated automatically so that typing may resume. You ↓ ┆19┆┆89┆┄┄then can enter the correct command line.↲ ↲ ┆8c┆┆83┆┆d8┆↓ ┆b0┆Halting Screen Output↲ ↲ ┆84┆If you are examining the contents of a file on the ↓ ┆19┆┆89┆┄┄terminal screen, you can keep the contents from ↓ ┆19┆┆89┆┄┄scrolling off the screen faster than you can read them. ↓ ┆19┆┆89┆┄┄To temporarily halt a program's output to the terminal ↓ ┆19┆┆89┆┄┄screen, type <CONTROL-S>. To resume output, type any key ↓ ┆19┆┆89┆┄┄except <INTERRUPT>.↲ ↲ ┆b0┆Sending a File to the Lineprinter↲ ↲ To print files on the lineprinter, type:↲ ↲ lpr file1↲ ↲ for one file, or↲ ↲ lpr file1 file2 file3↲ ↲ for several files.↲ ↲ ┆84┆You can also paginate and print a file of raw text, by ↓ ┆19┆┆89┆┄┄typing:↲ ↲ pr textfile lpr↲ ↲ ┆84┆The pr and lpr commands are very often used together, ↓ ┆19┆┆89┆┄┄connected by a pipe.↲ ↲ ┆84┆As another example, to sort, paginate, and print a file, ↓ ┆19┆┆89┆┄┄type:↲ ↲ sort datafile pr lpr↲ ↲ ┆b0┆Getting Line Printer Queue Information↲ ↲ ┆84┆More than one file may be waiting to be printed at the ↓ ┆19┆┆89┆┄┄lineprinter. XENIX does not require that the file be ↓ ┆19┆┆89┆┄┄printed before the lpr command finishes. Instead, lpr ↓ ┆19┆┆89┆┄┄makes sure only that the file is placed in a special ↓ ┆19┆┆89┆┄┄directory where it will wait its turn to be printed. If ↓ ┆19┆┆89┆┄┄you have problems with your lineprinter, or want to see ↓ ┆19┆┆89┆┄┄how many files are waiting in the queue, type:↲ ↲ ls -1 /usr/spool/lpd↲ ↲ ┆b0┆Finding out What Processes are Running↲ ↲ ┆84┆Because you may have several processes running ↓ ┆19┆┆89┆┄┄simultaneously, you may want to check what is currently ↓ ┆19┆┆89┆┄┄running. The ps command stands for "process status" and ↓ ┆19┆┆89┆┄┄lists information about all the processes associated ↓ ┆19┆┆89┆┄┄with your terminal. For instance, the output from a ps ↓ ┆19┆┆89┆┄┄command might look like this:↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ PID TTY TIME CMD↲ 10308 38 1:36 ed chap02.man↲ 49 38 0:29 -sh↲ 11267 38 0:00 sh -c ps↲ ↲ ┆84┆The "PID" column gives a unique process identification ↓ ┆19┆┆89┆┄┄number that can be used to kill a particular process. ↓ ┆19┆┆89┆┄┄The "TTY" column gives the terminal that the process is ↓ ┆19┆┆89┆┄┄associated with. The "TIME" column gives the cumulative ↓ ┆19┆┆89┆┄┄execution time for the process.↲ ↲ ┆b0┆Killing a Process↲ ↲ ┆84┆To stop execution of a process, you can type ↓ ┆19┆┆89┆┄┄<INTERRUPT>. However, to kill all of your processes ↓ ┆19┆┆89┆┄┄executing in the background, you will need to use the ↓ ┆19┆┆89┆┄┄kill command. Type:↲ ↲ kill 0↲ ↲ ┆84┆to kill all of your processes. To kill only a specified ↓ ┆19┆┆89┆┄┄process executing in the background, first use the ps ↓ ┆19┆┆89┆┄┄command to find out which processes are running and what ↓ ┆19┆┆89┆┄┄their process ID numbers are:↲ ↲ PID TTY TIME CMD↲ 3459 03 0:15 -sh↲ 4831 03 1:52 ed chap01.s↲ 5185 03 0:00 sh -c ps↲ ↲ Next, you might type↲ ↲ kill 4831↲ ↲ ┆84┆where 4831 is the PID of the process that you want ↓ ┆19┆┆89┆┄┄killed.↲ ↲ ↲ ┆b0┆┆a1┆6.2.5.2 File Manipulation Commands↲ ↲ ┆b0┆Creating Files↲ ↲ To create a new file, simply type:↲ ↲ >filename↲ ↲ ┆84┆Here, ┆a1┆filename┆e1┆ is the name of the newly created file. ↓ ┆19┆┆89┆┄┄The greater-than sign (>) is used to redirect output ↓ ┆19┆┆89┆┄┄from the terminal to a file. In general, new files are ↓ ┆19┆┆89┆┄┄created automatically by commands as needed.↲ ↲ ┆b0┆Displaying File Contents↲ ↲ ┆84┆To display the contents of a file, use the cat command. ↓ ┆19┆┆89┆┄┄Cat displays the contents of a file on the default ↓ ┆19┆┆89┆┄┄standard output file which is the terminal screen. For ↓ ════════════════════════════════════════════════════════════════════════ ↓ ┆19┆┆89┆┄┄example, the following command displays the contents of ↓ ┆19┆┆89┆┄┄┆a1┆file1┆e1┆ on the screen:↲ ↲ cat file1↲ ↲ ┆84┆Cat can also display the contents of more than one file ↓ ┆19┆┆89┆┄┄as in↲ ↲ cat file1 file2↲ ↲ ┆b0┆Combining Files↲ ↲ ┆84┆The cat command stands for "concatenate". It can be used ↓ ┆19┆┆89┆┄┄to combine several files into one new file. Thus, to ↓ ┆19┆┆89┆┄┄combine the two files named ┆a1┆file1┆e1┆ and ┆a1┆file2┆e1┆, and to ↓ ┆19┆┆89┆┄┄create a new file named ┆a1┆bigfile┆e1┆, type:↲ ↲ cat file1 file2 >bigfile↲ ↲ ┆84┆The greater-than sign (>) is used to redirect normal ↓ ┆19┆┆89┆┄┄output of the cat command from the terminal screen to ↓ ┆19┆┆89┆┄┄the new file.↲ ↲ ┆b0┆Moving a File↲ ↲ ┆84┆You can use the mv command in two different ways. First, ↓ ┆19┆┆89┆┄┄you can move a file so that it has a new name. For ↓ ┆19┆┆89┆┄┄instance, to move a file named ┆a1┆text┆e1┆ to a new file named ↓ ┆19┆┆89┆┄┄┆a1┆book┆e1┆, type:↲ ↲ mv text book↲ ↲ ┆84┆After this move completes, no file named ┆a1┆text┆e1┆ will exist ↓ ┆19┆┆89┆┄┄in the working directory. In effect, you are actually ↓ ┆19┆┆89┆┄┄renaming the file called ┆a1┆text┆e1┆. You can also move a file ↓ ┆19┆┆89┆┄┄into a specified directory. You must give the name of ↓ ┆19┆┆89┆┄┄the destination directory after the name of the file you ↓ ┆19┆┆89┆┄┄are moving. For instance, to move ┆a1┆file1┆e1┆ and ┆a1┆file2┆e1┆ into ↓ ┆19┆┆89┆┄┄the directory named /┆a1┆tmp┆e1┆, type:↲ ↲ mv file1 file2 /tmp↲ ↲ ┆84┆The two files you have moved will disappear from your ↓ ┆19┆┆89┆┄┄working directory, and be added to the directory /┆a1┆tmp┆e1┆. ↓ ┆19┆┆89┆┄┄The above command has exactly the same effect as typing ↓ ┆19┆┆89┆┄┄the following two commands:↲ ↲ mv file1 /tmp/file1↲ mv file2 /tmp/file2↲ ↲ ┆84┆Remember that the mv command always checks to see if the ↓ ┆19┆┆89┆┄┄last argument is the name of a directory, and if so, all ↓ ┆19┆┆89┆┄┄files designated by filename arguments are moved into ↓ ┆19┆┆89┆┄┄that directory.↲ ↲ mv anon johndoe↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆Copying a File↲ ↲ ┆84┆There are two ways in which you can use the cp command. ↓ ┆19┆┆89┆┄┄First, you can copy one file to another file. You can ↓ ┆19┆┆89┆┄┄also copy one or more files into a directory. To create ↓ ┆19┆┆89┆┄┄two copies of a file in your own working directory, you ↓ ┆19┆┆89┆┄┄must rename the new copy. To do this, type:↲ ↲ cp file clone-of-file↲ ↲ ┆84┆You will now have two files with identical contents in ↓ ┆19┆┆89┆┄┄your working directory.↲ ↲ ┆84┆To copy three files into a directory named ┆a1┆filedir┆e1┆, ↓ ┆19┆┆89┆┄┄type:↲ ↲ cp file1 file2 file3 filedir↲ ↲ ┆84┆In the above command, three files are copied into the ↓ ┆19┆┆89┆┄┄directory ┆a1┆filedir┆e1┆; the original versions still reside in ↓ ┆19┆┆89┆┄┄your working directory. There is a one-to-one ↓ ┆19┆┆89┆┄┄correspondence between the names in the two directories.↲ ↲ ┆b0┆Deleting A File↲ ↲ ┆84┆To delete or remove files, simply type:↲ ↲ rm file1 file2↲ ↲ ┆84┆In the above command, the files ┆a1┆file1┆e1┆ and ┆a1┆file2┆e1┆ are ↓ ┆19┆┆89┆┄┄removed from your working directory.↲ ↲ ┆b0┆Printing Your Working Directory↲ ↲ ┆84┆The pwd command stands for "print working directory". ↓ ┆19┆┆89┆┄┄For instance, if your current working directory is ↓ ┆19┆┆89┆┄┄/┆a1┆usr/joe┆e1┆, then when you type↲ ↲ pwd↲ ↲ you will get the output:↲ ↲ /usr/joe↲ ↲ ┆84┆You should always think of yourself as residing "in" ↓ ┆19┆┆89┆┄┄your working directory.↲ ↲ ┆b0┆Listing Directory Contents↲ ↲ ┆84┆The most basic directory command is ls. The ls command ↓ ┆19┆┆89┆┄┄sorts and lists the names of the files and directories ↓ ┆19┆┆89┆┄┄that reside in a given directory. Unless you specify ↓ ┆19┆┆89┆┄┄otherwise, the contents of your working directory are ↓ ┆19┆┆89┆┄┄listed. If arguments are given, then for each directory ↓ ┆19┆┆89┆┄┄argument ls lists the contents of the given directory; ↓ ┆19┆┆89┆┄┄for each file argument, ls repeats its name. For ↓ ┆19┆┆89┆┄┄instance, if you type↲ ↲ ls↲ ↲ ┆8c┆┆83┆┆e0┆↓ ┆84┆the output from the command might typically look like ↓ ┆19┆┆89┆┄┄this:↲ ↲ dir1↲ dir2↲ dir3↲ file1↲ file2 ↲ file3↲ ↲ Using the same directory, the command↲ ↲ ls d*↲ ↲ ┆84┆would list the files within each of the directories ↓ ┆19┆┆89┆┄┄┆a1┆dir1┆e1┆, ┆a1┆dir2┆e1┆, and ┆a1┆dir3┆e1┆.↲ ↲ ┆84┆The lc command, which stands for "list in columns", ↓ ┆19┆┆89┆┄┄prints names in columns, so more information can fit on ↓ ┆19┆┆89┆┄┄the screen at once than with ls. A sample listing ↓ ┆19┆┆89┆┄┄follows:↲ ↲ atfile help oem size v0↲ bin lib papers src v1↲ calendar maketape po termcap v2↲ cmds memos port termnames v5↲ convert mgr probs test.s↲ doem mkfs rand testdir↲ errs msg rand.c ttc↲ errs.sh nroff sco typeset↲ ↲ ┆84┆Lc also lets you recursively list a directory and all of ↓ ┆19┆┆89┆┄┄its subdirectories by typing↲ ↲ lc -R↲ ↲ where the -R stands for recursive.↲ ↲ ┆84┆A command very similar to ls and lc is l. L gives an ↓ ┆19┆┆89┆┄┄expanded "long" listing of a directory, producing an ↓ ┆19┆┆89┆┄┄output that might look someting like this:↲ ↲ total 501↲ drwxr-x--- 2 boris 272 Apr 5 14:33 dir1↲ drwxr-x--- 2 enid 272 Apr 5 14:33 dir2↲ drwxr-x--- 2 iris 592 Apr 6 11:12 dir3↲ -rw-r----- 1 olaf 282 Apr 7 15:11 file1↲ -rw-r----- 1 olaf 72 Apr 7 13:50 file2↲ -rw-r----- 1 olaf 1403 Apr 1 13:22 file3↲ ↲ ┆84┆Reading from left to right, the information given for ↓ ┆19┆┆89┆┄┄each file or directory includes:↲ ↲ 1. Permissions↲ ↲ 2. Number of links↲ ↲ ┆8c┆┆83┆┆c8┆↓ 3. Owner↲ ↲ 4. Size in bytes↲ ↲ 5. Time of last modification↲ ↲ 6. Filename↲ ↲ ┆84┆The information in this listing and how to change ↓ ┆19┆┆89┆┄┄permissions are discussed below.↲ ↲ ┆b0┆Changing Your Working Directory↲ ↲ ┆84┆Your working directory represents your location in the ↓ ┆19┆┆89┆┄┄file system: it is "where you are" in XENIX. To alter ↓ ┆19┆┆89┆┄┄your location in the XENIX file system, you need only ↓ ┆19┆┆89┆┄┄type:↲ ↲ cd↲ ↲ ┆84┆This changes your working directory to that of your home ↓ ┆19┆┆89┆┄┄directory. To move to any other directory, simply ↓ ┆19┆┆89┆┄┄specify that directory as an argument to cd. For ↓ ┆19┆┆89┆┄┄instance↲ ↲ cd /usr↲ ↲ ┆84┆moves you to the /┆a1┆usr┆e1┆ directory. Because you are always ↓ ┆19┆┆89┆┄┄"in" your working directory, changing working ↓ ┆19┆┆89┆┄┄directories is much like "traveling" from directory to ↓ ┆19┆┆89┆┄┄directory.↲ ↲ ┆b0┆Creating a Directory↲ ↲ ┆84┆To create a subdirectory in your working directory, use ↓ ┆19┆┆89┆┄┄the mkdir command. For instance, to create a new ↓ ┆19┆┆89┆┄┄directory named ┆a1┆phonenumbers┆e1┆, simply type:↲ ↲ mkdir phonenumbers↲ ↲ ┆84┆Now you will have a new, empty directory in your home ↓ ┆19┆┆89┆┄┄directory.↲ ↲ ┆b0┆Removing a Directory↲ ↲ ┆84┆To remove a directory located in your working directory, ↓ ┆19┆┆89┆┄┄use the rmdir command. For instance, to remove the ↓ ┆19┆┆89┆┄┄directory named ┆a1┆phonenumbers┆e1┆ from the current directory, ↓ ┆19┆┆89┆┄┄simply type:↲ ↲ rmdir phonenumbers↲ ↲ ┆84┆The directory ┆a1┆phonenumbers┆e1┆ must be empty before it can ↓ ┆19┆┆89┆┄┄be removed. This prevents you from accidentally deleting ↓ ┆19┆┆89┆┄┄files and directories.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆Renaming a Directory↲ ↲ ┆84┆To rename a directory, use the mv command, just as you ↓ ┆19┆┆89┆┄┄would if you were moving a file. Note that directories ↓ ┆19┆┆89┆┄┄and their contents cannot be moved with the mv command; ↓ ┆19┆┆89┆┄┄they can only be renamed. For instance, to rename the ↓ ┆19┆┆89┆┄┄directory ┆a1┆little.dir┆e1┆ to ┆a1┆big.dir┆e1┆, type:↲ ↲ mv little.dir big.dir↲ ↲ ┆84┆This is a simple renaming operation; no files are moved.↲ ↲ ↲ ┆b0┆┆a1┆6.2.5.3 Basic System Utilities↲ ↲ ┆b0┆Finding Out Who is on the System↲ ↲ ┆84┆The who command lists the names, terminal line numbers, ↓ ┆19┆┆89┆┄┄and login times of all users currently logged on the ↓ ┆19┆┆89┆┄┄system. For example, type:↲ ↲ who↲ ↲ ┆84┆This command should produce something like the following ↓ ┆19┆┆89┆┄┄output on your terminal screen:↲ ↲ arnold tty02 Apr 7 10:02↲ daphne tty21 Apr 7 07:47↲ elliot tty23 Apr 7 14:21↲ ellen tty25 Apr 7 08:36↲ gus tty26 Apr 7 09:55↲ adrian tty28 Apr 7 14:21↲ ↲ ┆b0┆Sorting a File↲ ↲ ┆84┆The sort command is one of the most useful XENIX file ↓ ┆19┆┆89┆┄┄processing commands. By default, sort sorts the lines of ↓ ┆19┆┆89┆┄┄a file according to the ASCII collating sequence. For ↓ ┆19┆┆89┆┄┄example, to sort a file named ┆a1┆phonelist┆e1┆, type:↲ ↲ sort phonelist↲ ↲ ┆84┆In the above case, the sorted contents of the file are ↓ ┆19┆┆89┆┄┄displayed on the screen. To create a sorted version of ↓ ┆19┆┆89┆┄┄┆a1┆phonelist┆e1┆ named ┆a1┆phonesort┆e1┆, type:↲ ↲ sort phonelist >phonesort↲ ↲ ┆84┆Note that sort is useful in sorting the output from ↓ ┆19┆┆89┆┄┄other commands. For example, to sort the output from ↓ ┆19┆┆89┆┄┄execution of a who command, type:↲ ↲ who sort >whosort↲ ↲ ┆84┆A wide variety of other sorting options are available ↓ ┆19┆┆89┆┄┄for sort.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆Searching for a Pattern in a File↲ ↲ ┆84┆The grep command selects and extracts lines from a file, ↓ ┆19┆┆89┆┄┄printing only those lines that match a given pattern.↲ ↲ ┆84┆For example, to print out all lines in a file containing ↓ ┆19┆┆89┆┄┄the word "tty38", type:↲ ↲ grep 'tty38' file↲ ↲ ┆84┆In general, you should always enclose the pattern you ↓ ┆19┆┆89┆┄┄are searching for in single quotation marks ('), so that ↓ ┆19┆┆89┆┄┄special metacharacters are not expanded unexpectedly by ↓ ┆19┆┆89┆┄┄the shell command interpreter.↲ ↲ ┆84┆┆b0┆Finding Out the Time and Date↲ ↲ ┆84┆To get the current time and date simply type↲ ↲ date↲ ↲ ┆84┆You will get a simple answer in the following form:↲ ↲ Tue Feb 18 19:02:19 PST 1983↲ ↲ ↲ ┆b0┆┆a1┆6.2.6 Text Editing with Ed↲ ↲ ┆84┆Text editing - the capacity to manipulate the contents ↓ ┆19┆┆89┆┄┄of any file, whether it contains written text, data, or ↓ ┆19┆┆89┆┄┄program code - is essential for using any computer ↓ ┆19┆┆89┆┄┄system. XENIX offers several editors, and related ↓ ┆19┆┆89┆┄┄pattern recognition and file comparison utilities for ↓ ┆19┆┆89┆┄┄use both in text processing and programming. These tools ↓ ┆19┆┆89┆┄┄are discussed at length in the XENIX Fundamentals ↓ ┆19┆┆89┆┄┄manual. In your role as system manager you have already ↓ ┆19┆┆89┆┄┄been introduced to several important XENIX files - ↓ ┆19┆┆89┆┄┄/┆a1┆etc/passwd┆e1┆, .┆a1┆profile┆e1┆, and /┆a1┆etc/rc┆e1┆, to name a few. You ↓ ┆19┆┆89┆┄┄will soon find that you need to add or change these, and ↓ ┆19┆┆89┆┄┄other files on the system.↲ ↲ ┆84┆This is a brief summary of some of the many functions of ↓ ┆19┆┆89┆┄┄the XENIX text editor, ed. It does not contain an ↓ ┆19┆┆89┆┄┄exhaustive list of ed commands, nor does it even begin ↓ ┆19┆┆89┆┄┄to demonstrate the wide range of editing functions ↓ ┆19┆┆89┆┄┄possible on your XENIX system. However, it should help ↓ ┆19┆┆89┆┄┄you to get you started using a text editor with ↓ ┆19┆┆89┆┄┄sufficient dexterity to do your routine system ↓ ┆19┆┆89┆┄┄management tasks.↲ ↲ ↲ ┆b0┆┆a1┆6.2.6.1 Invoking the Editor↲ ↲ To invoke ed, type:↲ ↲ ed ┆a1┆filename┆e1┆↲ ↲ ┆84┆where ┆a1┆filename┆e1┆ is the name of the file you want to edit. ↓ ┆19┆┆89┆┄┄If no name is given, a question mark (?) is printed. ↓ ┆8c┆┆83┆┆d8┆↓ ┆19┆┆89┆┄┄This is not an error. You are simply creating a new file ↓ ┆19┆┆89┆┄┄to edit. The text in the new file is kept in a special ↓ ┆19┆┆89┆┄┄buffer file while you are working on it. Think of the ↓ ┆19┆┆89┆┄┄buffer as a work space - a kind of scratch pad with a ↓ ┆19┆┆89┆┄┄temporary copy of the file you are editing. You tell ed ↓ ┆19┆┆89┆┄┄what to do to your text by typing instructions called ↓ ┆19┆┆89┆┄┄"commands". Most commands consist of a single letter, ↓ ┆19┆┆89┆┄┄which must be typed in lowercase. Each command is typed ↓ ┆19┆┆89┆┄┄on a separate line and followed by <ENTER>, just like ↓ ┆19┆┆89┆┄┄typing a XENIX system command. Ed will respond to your ↓ ┆19┆┆89┆┄┄commands without giving you any prompts or messages. If ↓ ┆19┆┆89┆┄┄you make an error typing commands in ed, it will answer ↓ ┆19┆┆89┆┄┄you with:↲ ↲ ?↲ ↲ ↲ ┆b0┆┆a1┆6.2.6.2 Adding Text to a File↲ ↲ ┆84┆To add lines of text to the file you are editing, just ↓ ┆19┆┆89┆┄┄type an "a" for append, followed by <ENTER>. Next, enter ↓ ┆19┆┆89┆┄┄the lines of text you want, like this:↲ ↲ a↲ Now is the time↲ for all good men↲ to come to the aid of their party.↲ .↲ ↲ ┆84┆To stop appending, type a line that contains only a ↓ ┆19┆┆89┆┄┄period on a line by itself. A period (.) is used to tell ↓ ┆19┆┆89┆┄┄ed that you have finished appending.↲ ↲ ↲ ┆b0┆┆a1┆6.2.6.3 Saving Your File↲ ↲ ┆84┆It's likely that you will want to save your text for ↓ ┆19┆┆89┆┄┄later use. To save the contents of your file, use the ↓ ┆19┆┆89┆┄┄write command, w, followed by the name of the file that ↓ ┆19┆┆89┆┄┄you want to write to. This copies the temporary buffer's ↓ ┆19┆┆89┆┄┄contents to the file you name, replacing any previous ↓ ┆19┆┆89┆┄┄contents of this file. For example, to save the text in ↓ ┆19┆┆89┆┄┄a file named ┆a1┆text┆e1┆, type:↲ ↲ w text↲ ↲ ┆84┆Leave a space between w and the filename. Writing a file ↓ ┆19┆┆89┆┄┄just makes a permanent copy of your text, so you can go ↓ ┆19┆┆89┆┄┄on adding lines to the copy you are editing. If you use ↓ ┆19┆┆89┆┄┄the w command without naming a file, ed writes back out ↓ ┆19┆┆89┆┄┄to the file that you named when you invoked ed. Because ↓ ┆19┆┆89┆┄┄ed always works on a copy of a file, not the file ↓ ┆19┆┆89┆┄┄itself, no change in the contents of a file takes place ↓ ┆19┆┆89┆┄┄until you give a w command.↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.2.6.4 Exiting the Editor↲ ↲ ┆84┆To terminate a session with ed, save the text you're ↓ ┆19┆┆89┆┄┄working on by writing it to a file using the w command, ↓ ┆19┆┆89┆┄┄and then type:↲ ↲ q↲ ↲ ┆84┆The system responds with the XENIX prompt character. At ↓ ┆19┆┆89┆┄┄this point your buffer vanishes, along with the text you ↓ ┆19┆┆89┆┄┄have been working on, which is why you want to write it ↓ ┆19┆┆89┆┄┄out before quitting - unless you have made a mistake, ↓ ┆19┆┆89┆┄┄and do not want to keep your new file. Actually, ed will ↓ ┆19┆┆89┆┄┄print "?", if you try to quit without writing. At that ↓ ┆19┆┆89┆┄┄point, write out the text if you want; if not, type ↓ ┆19┆┆89┆┄┄another q.↲ ↲ ┆84┆It's good practice to name your file when you first ↓ ┆19┆┆89┆┄┄start using ed:↲ ↲ ed file↲ ↲ ┆84┆then just type w or q. This way, you can type w from time ↓ ┆19┆┆89┆┄┄to time and be secure in the knowledge that if you got ↓ ┆19┆┆89┆┄┄the filename right in the beginning, you are writing out ↓ ┆19┆┆89┆┄┄to the proper file each time.↲ ↲ ↲ ┆b0┆┆a1┆6.2.6.5 Printing the Contents of Your File↲ ↲ ┆84┆To see the contents of the buffer (or parts of it) on ↓ ┆19┆┆89┆┄┄the terminal screen, use the "print" command, p. To do ↓ ┆19┆┆89┆┄┄this, specify the lines where you want printing to begin ↓ ┆19┆┆89┆┄┄and where you want it to end, separated by a comma, and ↓ ┆19┆┆89┆┄┄followed by the letter "p". Thus, to print the first two ↓ ┆19┆┆89┆┄┄lines, (that is, lines 1 through 2) type:↲ ↲ 1,2p↲ ↲ ┆84┆Suppose you want to print all the lines in the buffer. ↓ ┆19┆┆89┆┄┄Then you can use the dollar sign ($), which stands for ↓ ┆19┆┆89┆┄┄"the line number of the last line in the buffer". Use it ↓ ┆19┆┆89┆┄┄this way:↲ ↲ 1,$p↲ ↲ ┆84┆This will print all the lines in the file (from line 1 ↓ ┆19┆┆89┆┄┄to the last line).↲ ↲ To print the last line, type:↲ ↲ $p↲ ↲ ┆84┆You can print any single line by typing the line number, ↓ ┆19┆┆89┆┄┄followed by a p. Thus↲ ↲ lp↲ ↲ prints the first line of text.↲ ↲ ┆8c┆┆83┆┆e0┆↓ ┆84┆In fact, you can print any single line by typing just ↓ ┆19┆┆89┆┄┄the line number; there's no need to type the letter p. ↓ ┆19┆┆89┆┄┄So if you type↲ ↲ $↲ ↲ ed prints the last line of the buffer.↲ ↲ ┆84┆You can also save effort in specifying lines by using ↓ ┆19┆┆89┆┄┄plus and minus as line numbers by themselves. For ↓ ┆19┆┆89┆┄┄example↲ ↲ -↲ ↲ ┆84┆by itself is a command to move back up one line in the ↓ ┆19┆┆89┆┄┄file.↲ ↲ ┆84┆Ed maintains a record of the last line that you did ↓ ┆19┆┆89┆┄┄anything to (in this case, line 3, which you just ↓ ┆19┆┆89┆┄┄printed) so that it can be used instead of an explicit ↓ ┆19┆┆89┆┄┄line number. The line most recently acted on is referred ↓ ┆19┆┆89┆┄┄to with a period (.) and is called "dot". Dot is a line ↓ ┆19┆┆89┆┄┄number in the same way that dollar ($) is; it means ↓ ┆19┆┆89┆┄┄"the current line", or loosely, "the line you most ↓ ┆19┆┆89┆┄┄recently did something to". You can find out the value ↓ ┆19┆┆89┆┄┄of dot at any time by typing:↲ ↲ .=↲ ↲ ↲ ┆b0┆┆b0┆┆a1┆6.2.6.6 Deleting Text↲ ↲ ┆84┆To delete text from the file you are editing, use the ↓ ┆19┆┆89┆┄┄"delete" command, d. The lines to be deleted are ↓ ┆19┆┆89┆┄┄specified for d exactly as they are for p:↲ ↲ ┆a1┆starting-line,ending-line┆e1┆d↲ ↲ thus, the command↲ ↲ 4,$d ↲ ↲ ┆84┆deletes lines 4 through the end. There are now three ↓ ┆19┆┆89┆┄┄lines left in our example, as you can check by typing:↲ ↲ 1,$p↲ ↲ ┆84┆Notice that $ now is line 3! Dot is set to the next ↓ ┆19┆┆89┆┄┄line after the last line deleted, unless the last line ↓ ┆19┆┆89┆┄┄deleted is the last line of your file. In that case, dot ↓ ┆19┆┆89┆┄┄is set to $.↲ ↲ ↲ ┆b0┆┆a1┆6.2.6.7 Substituting Text↲ ↲ ┆84┆The "substitute" command, s, is used to replace one ↓ ┆19┆┆89┆┄┄string of characters with another. You can use this ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄command to change individual words or letters within a ↓ ┆19┆┆89┆┄┄line or group of lines. For example, suppose that, due ↓ ┆19┆┆89┆┄┄to a typing error, line 1 says:↲ ↲ Now is th time↲ ↲ ┆84┆The letter "e" has been left off of the word "the". You ↓ ┆19┆┆89┆┄┄can use s to fix this up:↲ ↲ 1s/th/the/↲ ↲ ┆84┆This substitutes the characters "the" in line 1 for the ↓ ┆19┆┆89┆┄┄characters "th". To verify that the substitution has ↓ ┆19┆┆89┆┄┄worked, type↲ ↲ p↲ ↲ to get↲ ↲ Now is the time↲ ↲ ┆84┆which is what you wanted. Notice that dot must have been ↓ ┆19┆┆89┆┄┄set to the line where the substitution took place, since ↓ ┆19┆┆89┆┄┄the p command printed that line. Dot is always set this ↓ ┆19┆┆89┆┄┄way with the s command.↲ ↲ The syntax for the substitute command is:↲ ↲ ┆a1┆starting-line,ending-line┆e1┆s┆a1┆/pattern/replacement/┆e1┆↲ ↲ ┆84┆The string of characters between the first pair of ↓ ┆19┆┆89┆┄┄slashes is replaced by whatever is between the second ↓ ┆19┆┆89┆┄┄pair, in all the lines between ┆a1┆starting-line┆e1┆ and ┆a1┆ending-↓ ┆19┆┆89┆┄┆84┆line┆e1┆. Only the first occurrence on each line is changed, ↓ ┆19┆┆89┆┄┄however. The rules for line numbers are the same as ↓ ┆19┆┆89┆┄┄those for p, except that dot is set to the last line ↓ ┆19┆┆89┆┄┄changed. However, if no substitution takes place, dot is ↓ ┆19┆┆89┆┄┄not changed. This causes printing of a question mark (?) ↓ ┆19┆┆89┆┄┄as a warning.↲ ↲ Thus, you can type↲ ↲ 1,$ s/speling/spelling/↲ ↲ ┆84┆and correct the first spelling mistake on each line in ↓ ┆19┆┆89┆┄┄the text.↲ ↲ ┆84┆If no line numbers are given, the s command assumes we ↓ ┆19┆┆89┆┄┄mean "make the substitution on line dot", so it changes ↓ ┆19┆┆89┆┄┄things only on the current line. This leads to the very ↓ ┆19┆┆89┆┄┄common sequence↲ ↲ s/something/something else/p↲ ↲ ┆84┆which makes some correction on the current line, and ↓ ┆19┆┆89┆┄┄then prints it, to make sure it worked out right. ↓ ┆19┆┆89┆┄┄(Notice that there is a p on the same line as the s ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄command. With few exceptions, p can follow any command; ↓ ┆19┆┆89┆┄┄no other multi-command lines are legal.) To change all ↓ ┆19┆┆89┆┄┄occurrences on the current line, you should type:↲ ↲ s/something/something else/g↲ ↲ ┆84┆where g stands for a global substitution of all ↓ ┆19┆┆89┆┄┄occurrences on the line.↲ ↲ It's also legal to type↲ ↲ s/string//↲ ↲ ┆84┆which means "change the first string of characters to ↓ ┆19┆┆89┆┄┄nothing", or in other words, remove them.↲ ↲ ↲ ┆b0┆┆a1┆6.2.6.8 Searching↲ ↲ ┆84┆Suppose you have the following three lines of text:↲ ↲ Now is the time↲ for all good men↲ to come to the aid of their party.↲ ↲ ┆84┆Now, suppose you want to find the line that contains the ↓ ┆19┆┆89┆┄┄word "their", so that you can change it to the word ↓ ┆19┆┆89┆┄┄"the". With a file only three lines long, it's pretty ↓ ┆19┆┆89┆┄┄easy to keep track of which line the word "their" is on. ↓ ┆19┆┆89┆┄┄But if the file contained several hundred lines, and ↓ ┆19┆┆89┆┄┄you'd been making changes, deleting and rearranging ↓ ┆19┆┆89┆┄┄lines, and so on, you would no longer really know what ↓ ┆19┆┆89┆┄┄this line number would be. Instead, you would use ↓ ┆19┆┆89┆┄┄context searching. Context searching is simply a method ↓ ┆19┆┆89┆┄┄of specifying the desired line, regardless of what its ↓ ┆19┆┆89┆┄┄number is, by specifying some textual pattern contained ↓ ┆19┆┆89┆┄┄in the line.↲ ↲ ┆84┆The way to say "search for a line that contains this ↓ ┆19┆┆89┆┄┄particular string of characters" is to type:↲ ↲ /string of characters we want to find/↲ ↲ For example, the ed command↲ ↲ /their/↲ ↲ ┆84┆is a context search which is sufficient to find the ↓ ┆19┆┆89┆┄┄desired line. It will locate the next occurrence of the ↓ ┆19┆┆89┆┄┄characters between slashes ("their"). It also sets dot ↓ ┆19┆┆89┆┄┄to that line and prints the line for verification:↲ ↲ to come to the aid of their party.↲ ↲ ┆84┆"Next occurrence" means that ed starts looking for the ↓ ┆19┆┆89┆┄┄string at line .+1, searches to the end of the buffer, ↓ ┆19┆┆89┆┄┄then continues at line 1 and searches to line dot. (That ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄is, the search "wraps around" from $ to 1). It scans ↓ ┆19┆┆89┆┄┄all the lines in the buffer until it either finds the ↓ ┆19┆┆89┆┄┄desired line or gets back to dot again. If the given ↓ ┆19┆┆89┆┄┄string of characters can't be found in any line, ed ↓ ┆19┆┆89┆┄┄prints an error message:↲ ↲ ?↲ ↲ Otherwise, ed prints the line it found.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.3 Getting the System Ready for Your Users↲ ↲ ┆84┆Now that you have some experience turning on your ↓ ┆19┆┆89┆┄┄system, and using your keyboard to enter commands, you ↓ ┆19┆┆89┆┄┄should begin to feel comfortable in your role as system ↓ ┆19┆┆89┆┄┄manager.↲ ↲ ┆84┆One of XENIX's special features is its capacity to ↓ ┆19┆┆89┆┄┄support multiple users. Even if your system has only one ↓ ┆19┆┆89┆┄┄terminal, several people may be using the system at ↓ ┆19┆┆89┆┄┄different times. With XENIX, each user accesses, or ↓ ┆19┆┆89┆┄┄"logs in", to the system under a separate name and is ↓ ┆19┆┆89┆┄┄assigned a workspace, or "user directory" of his own. ↓ ┆19┆┆89┆┄┄Each user is assigned a password to prevent unauthorized ↓ ┆19┆┆89┆┄┄users from accessing information on the system. Your job ↓ ┆19┆┆89┆┄┄as system manager is to create and maintain user ↓ ┆19┆┆89┆┄┄accounts.↲ ↲ ┆84┆In this section you will be introduced to one special ↓ ┆19┆┆89┆┄┄user on the system: the "super-user", and learn the ↓ ┆19┆┆89┆┄┄following simple procedures:↲ ↲ . how to add users to the system with the mkuser program↲ ↲ . ┆84┆how to remove users from the system with the rmuser ↓ ┆19┆┆8b┆┄┄program↲ ↲ . how to change a user's password↲ ↲ ┆84┆You will also be introduced to two important XENIX ↓ ┆19┆┆89┆┄┄files: /┆a1┆etc/passwd┆e1┆ and .┆a1┆profile┆e1┆.↲ ↲ ↲ ┆b0┆┆a1┆6.3.1 The Super-User↲ ↲ ┆84┆XENIX restricts access to many of its own system files, ↓ ┆19┆┆89┆┄┄and provides a protection mechanism to allow users to ↓ ┆19┆┆89┆┄┄restrict use of their own files. There is one user, ↓ ┆19┆┆89┆┄┄however, who has unlimited access to the system: the ↓ ┆19┆┆89┆┄┄aptly named "super-user", whose login name is "root". ↓ ┆19┆┆89┆┄┄Because the "super-user" has unrestricted access to ↓ ┆19┆┆89┆┄┄every file on the system, many regular system ↓ ┆19┆┆89┆┄┄maintenance duties require you to log in as "root". Only ↓ ┆19┆┆89┆┄┄the "root" can add or remove user accounts, for example. ↓ ┆19┆┆89┆┄┄However, because the super-user's access is unlimited, ↓ ┆19┆┆89┆┄┄simple mistakes can cause massive damage to system and ↓ ┆19┆┆89┆┄┄user files, or even bring down the system itself. ↓ ┆19┆┆89┆┄┄Therefore, the number of individuals who are given the ↓ ┆19┆┆89┆┄┄super-user password should be extremely limited, and ↓ ┆19┆┆89┆┄┄those users who are authorized to act as super-user, ↓ ┆19┆┆89┆┄┄including the system manager, should log in as super-↓ ┆19┆┆89┆┄┄user only when absolutely necessary to perform a system ↓ ┆19┆┆89┆┄┄maintenance task.↲ ↲ ┆84┆One continuing responsibility you will have as system ↓ ┆19┆┆89┆┄┄manager is creating and maintaining "accounts" for each ↓ ┆19┆┆89┆┄┄of your users. Please remember that even if you are the ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄only user on your system, you should create a working ↓ ┆19┆┆89┆┄┄account for yourself and consistently log in as an ↓ ┆19┆┆89┆┄┄ordinary user, unless you must be super-user in order to ↓ ┆19┆┆89┆┄┄perform a maintenance task. Accidental misuse of your ↓ ┆19┆┆89┆┄┄super-user powers can result in disaster.↲ ↲ ↲ ┆b0┆┆a1┆6.3.2 Adding a User: The mkuser Program↲ ↲ ┆84┆The mkuser program makes the process of adding a new ↓ ┆19┆┆89┆┄┄user as easy as possible for you. To prevent ↓ ┆19┆┆89┆┄┄unauthorized users from creating "logins" for ↓ ┆19┆┆89┆┄┄themselves, you must be logged in as "root" to use the ↓ ┆19┆┆89┆┄┄mkuser program. When you are logged in as root, you will ↓ ┆19┆┆89┆┄┄see a number sign ( ) prompt on the screen rather than ↓ ┆19┆┆89┆┄┄the dollar sign ($) which prompts ordinary user ↓ ┆19┆┆89┆┄┄activities. Simply type↲ ↲ mkuser↲ ↲ ┆84┆and hit the <ENTER> or <RETURN> key. The system will ↓ ┆19┆┆89┆┄┄respond with the following lines:↲ ↲ ┆06┆Mkuser ↓ ↲ ┆06┆Add a user to the system↲ ↲ ┆06┆Do you require detailed instructions? (y/n/q):┆a1┆ ┆e1┆↲ ↲ ┆84┆You must respond with one of these three letters. If you ↓ ┆19┆┆89┆┄┄answer with the letter "q", which stands for "quit", the ↓ ┆19┆┆89┆┄┄mkuser program will terminate, and return you to the ↓ ┆19┆┆89┆┄┄system. Note that typing the letter "q", the word ↓ ┆19┆┆89┆┄┄"quit", or hitting the <BREAK> key will terminate the ↓ ┆19┆┆89┆┄┄mkuser program at any time, unless you are specifically ↓ ┆19┆┆89┆┄┄instructed NOT to use it. When you are more familiar ↓ ┆19┆┆89┆┄┄with mkuser you will probably answer "n" for no, if you ↓ ┆19┆┆89┆┄┄do not need to read the explanation again. If you answer ↓ ┆19┆┆89┆┄┄"y" for yes, you will be provided with more information.↲ ↲ ┆84┆You will need to know the meaning of three terms in ↓ ┆19┆┆89┆┄┄order to continue:↲ ↲ login name ┆84┆is the name by which the user will be ↓ ┆19┆┆9b┆┄┄known to the system. It is generally ↓ ┆19┆┆9b┆┄┄convenient to shorten this for easy ↓ ┆19┆┆9b┆┄┄entry to, perhaps, a first name and ↓ ┆19┆┆9b┆┄┄last initial (johnd), a first initial ↓ ┆19┆┆9b┆┄┄and last name (jdoe), or three ↓ ┆19┆┆9b┆┄┄initials (jad).↲ ↲ comment ┆84┆gives you space to record any ↓ ┆19┆┆9b┆┄┄information about your new user, such ↓ ┆19┆┆9b┆┄┄as his department and phone extension ↓ ┆19┆┆9b┆┄┄(Accounting 333). You are limited to ↓ ┆19┆┆9b┆┄┄twenty characters, including spaces.↲ ↲ ┆8c┆┆83┆┆c8┆↓ initial password ┆84┆is the password you, as system ↓ ┆19┆┆9b┆┄┄manager, assign to your new users. The ↓ ┆19┆┆9b┆┄┄user may change this password after he ↓ ┆19┆┆9b┆┄┄has logged in with the initial ↓ ┆19┆┆9b┆┄┄password. (optional)↲ ↲ ┆84┆After you have read the instructions, you may continue ↓ ┆19┆┆89┆┄┄to use mkuser by hitting the <ENTER> key.↲ ↲ ┆84┆The program will now ask you to enter the new user's ↓ ┆19┆┆89┆┄┄login name. Note the rules for a valid entry; you will ↓ ┆19┆┆89┆┄┄not be allowed to create an invalid entry. For example,↲ ↲ login name: johnd↲ ↲ ┆84┆After you hit <ENTER>, you will be asked for a comment ↓ ┆19┆┆89┆┄┄entry. This entry is limited to a total of 20 ↓ ┆19┆┆89┆┄┄characters, including spaces.↲ ↲ ┆06┆Please enter Comment>--------------------↲ >Accounting 333↲ ↲ ┆84┆If you do not wish to enter a comment, just type <ENTER> ↓ ┆19┆┆89┆┄┄instead. Now mkuser will show you the entire entry it ↓ ┆19┆┆89┆┄┄has created for the new user in a special system file ↓ ┆19┆┆89┆┄┄called /┆a1┆etc/passwd┆e1┆. This entry includes the following:↲ ↲ user ID ┆84┆The mkuser program will arbitrarily ↓ ┆19┆┆98┆┄┄create user ID (you will often see this ↓ ┆19┆┆98┆┄┄abbreviated in XENIX documentation as ↓ ┆19┆┆98┆┄┄"uid") numbers for each new user account, ↓ ┆19┆┆98┆┄┄starting at 200. Numbers below 200 are ↓ ┆19┆┆98┆┄┄reserved for system IDs like root and ↓ ┆19┆┆98┆┄┄cron.↲ ↲ group ID ┆84┆The group ID is an optional facility for ↓ ┆19┆┆98┆┄┄allowing joint access to the same files. ↓ ┆19┆┆98┆┄┄mkuser will initially set the group id of ↓ ┆19┆┆98┆┄┄all new users to 50. In effect, all users ↓ ┆19┆┆98┆┄┄belong to the same "group", and they ↓ ┆19┆┆98┆┄┄share access to all files. If greater ↓ ┆19┆┆98┆┄┄privacy is desired, or if you wish to ↓ ┆19┆┆98┆┄┄create true group IDs, the /┆a1┆etc/passwd┆e1┆ ↓ ┆19┆┆98┆┄┄file may be edited, using your text ↓ ┆19┆┆98┆┄┄editor.↲ ↲ home directory ┆84┆The mkuser program automatically creates ↓ ┆19┆┆98┆┄┄a work space for the new user, a ↓ ┆19┆┆98┆┄┄"directory" of the same name as the login ↓ ┆19┆┆98┆┄┄name, located in the /┆a1┆usr┆e1┆ parent ↓ ┆19┆┆98┆┄┄directory. In this example, the directory ↓ ┆19┆┆98┆┄┄would be:↲ ↲ /usr/johnd↲ ↲ comment field ┆84┆This will contain whatever information ↓ ┆19┆┆98┆┄┄you have entered (in this case, John ↓ ┆19┆┆98┆┄┄Doe's department and phone extension).↲ ↲ ┆8c┆┆83┆┆d8┆↓ shell ┆84┆The shell is a XENIX program which ↓ ┆19┆┆98┆┄┄prompts for and interprets user commands, ↓ ┆19┆┆98┆┄┄normally /┆a1┆bin/sh┆e1┆ unless otherwise ↓ ┆19┆┆98┆┄┄specified.↲ ↲ The /┆a1┆etc/passwd┆e1┆ entry for you:↲ ┆a1┆ ↲ ↲ User name is johnd↲ Comment field is: Accounting 333↲ Password file entry is:↲ ┆e1┆┆e1┆↲ johnd:j9djf:204:204:Accounting 333:/usr/johnd:/bin/sh:↲ ↲ Do you want to change anything? (y/n/q):↲ ┆a1┆ ↲ ↲ ┆84┆Every user of the system must have an entry in this ↓ ┆19┆┆89┆┄┄file. Note that every field is separated by a colon (:).↲ ↲ ┆84┆The empty field, ::, after the login name is the password ↓ ┆19┆┆89┆┄┄field. If you enter a password it will contain a strange ↓ ┆19┆┆89┆┄┄sequence of characters, which is the "encrypted", or ↓ ┆19┆┆89┆┄┄coded, version of the password you created.↲ ↲ ┆84┆The mkuser program will give you an opportunity to ↓ ┆19┆┆89┆┄┄change the user name, or comment at this point, if you ↓ ┆19┆┆89┆┄┄answer "n" for no.↲ ↲ ┆a1┆ ↲ ↲ ┆06┆You can change any of the following items:↲ ↲ ┆06┆username↲ ↲ ┆06┆comment↲ ┆84┆┆a1┆ ↲ ↲ ┆84┆If you hit <BREAK>, the mkuser program will terminate ↓ ┆19┆┆89┆┄┄without adding the new user. If you do not hit <BREAK>, ↓ ┆19┆┆89┆┄┄it will report:↲ ┆a1┆ ↲ ↲ ┆06┆Password file updated↲ Home directory /usr/johnd created↲ /usr/johnd/.profile created↲ Test mail sent to user: johnd↲ User johnd added to this system.↲ ┆a1┆ ↲ ↲ ┆84┆Now John Doe can use the system but you can also give ↓ ┆19┆┆89┆┄┄him a password if you answer (y) yes to the next ↓ ┆19┆┆89┆┄┄question appearing on the screen:↲ ↲ ┆84┆Do you want to give John Doe a password (y/n)?↲ ↲ ┆8c┆┆83┆┆c0┆↓ ┆84┆If you answered yes, the program will ask you for a ↓ ┆19┆┆89┆┄┄password entry. You are encouraged to mix uppercase and ↓ ┆19┆┆89┆┄┄lowercase letters, digits, and special characters to make ↓ ┆19┆┆89┆┄┄the password hard to guess. After the user logs in for ↓ ┆19┆┆89┆┄┄the first time with the password you give him, he can ↓ ┆19┆┆89┆┄┄change it with the passwd command. (See Section 6.2 for ↓ ┆19┆┆89┆┄┄a description of the passwd command). Please type ↓ ┆19┆┆89┆┄┄carefully because the password will NOT appear on your ↓ ┆19┆┆89┆┄┄screen as you type; you will not be able to see if you ↓ ┆19┆┆89┆┄┄have made a mistake. You will be asked twice for the ↓ ┆19┆┆89┆┄┄password; if the two entries are not identical, XENIX ↓ ┆19┆┆89┆┄┄will not accept them.↲ ↲ ┆84┆Now John Doe can use the system as soon as you tell him ↓ ┆19┆┆89┆┄┄his login name and password (if any).↲ ↲ ┆84┆When he logs in for the first time with his new login ↓ ┆19┆┆89┆┄┄name and password, he will receive the message:↲ ↲ ┆a1┆┆05┆↲ ↲ ┆06┆You have mail↲ ┆a1┆┆05┆↲ ↲ ┆84┆If John is at all curious, he will type the command↲ ↲ mail↲ ↲ and the system will respond↲ ↲ ┆a1┆┆05┆↲ ↲ ┆06┆From root date ↲ Welcome to XENIX!↲ ┆a1┆┆05┆↲ ↲ ┆84┆If he chooses, he may change his password at this point ↓ ┆19┆┆89┆┄┄by entering the command↲ ↲ passwd↲ ↲ XENIX will respond:↲ ↲ ┆a1┆┆05┆↲ ↲ ┆06┆Changing password for johnd.↲ Old password:↲ New password:↲ ┆a1┆┆05┆↲ ↲ ┆84┆John enters his old password, followed by his choice of ↓ ┆19┆┆89┆┄┄a new password. the passwd command automatically updates ↓ ┆19┆┆89┆┄┄the entry in the /┆a1┆etc/passwd┆e1┆ file.↲ ↲ ┆84┆After you have been acting in the role of system manager ↓ ┆19┆┆89┆┄┄for a while, you may have reason to change entries in ↓ ┆19┆┆89┆┄┄the /┆a1┆etc/passwd┆e1┆ file directly, such as creating new ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄group IDs. If you are logged in as super-user, you will ↓ ┆19┆┆89┆┄┄be able to edit /┆a1┆etc/passwd┆e1┆ like any other file, with ↓ ┆19┆┆89┆┄┄the following precautions:↲ ↲ . ┆84┆Always use the passwd command to change passwords.↲ ↲ . ┆84┆Make changes to /┆a1┆etc/passwd┆e1┆ when the system is ↓ ┆19┆┆8b┆┄┄relatively idle.↲ ↲ . Never touch system IDs, like "cron" or "root".↲ ↲ . ┆84┆Save a copy of the old /etc/passwd file under another ↓ ┆19┆┆8b┆┄┄name, for example:↲ ↲ cp /etc/passwd /etc/passwd-↲ ↲ ↲ ┆b0┆┆a1┆6.3.3 The .profile File↲ ↲ ┆84┆When any user, including root, or the super-user, first ↓ ┆19┆┆89┆┄┄logs in, a file in that user's "home" directory called ↓ ┆19┆┆89┆┄┄.┆a1┆profile┆e1┆ is executed automatically. This file performs ↓ ┆19┆┆89┆┄┄several functions:↲ ↲ . ┆84┆It tells the system what kind of terminal the user is ↓ ┆19┆┆8b┆┄┄working on.↲ ↲ . ┆84┆It establishes the name of the user's home directory.↲ ↲ . ┆84┆It tells the system where to look for programs the ↓ ┆19┆┆8b┆┄┄user runs.↲ ↲ . ┆84┆It tells the system where the user's electronic mail ↓ ┆19┆┆8b┆┄┄box is located.↲ ↲ . ┆84┆It determines the meaning of certain characters on the ↓ ┆19┆┆8b┆┄┄terminal, such as "kill" and "backspace".↲ ↲ ┆84┆The mkuser program automatically creates the .┆a1┆profile┆e1┆ ↓ ┆19┆┆89┆┄┄file in each user's directory, with entries which should ↓ ┆19┆┆89┆┄┄be suitable. However, if changes are necessary, it can ↓ ┆19┆┆89┆┄┄be edited like any XENIX file, using your text editor. ↓ ┆19┆┆89┆┄┄Ordinary users may edit their own .┆a1┆profile┆e1┆ file.↲ ↲ ↲ ┆b0┆┆a1┆6.3.4 Removing a User: The rmuser Program↲ ↲ ┆84┆Of course, it is sometimes necessary to remove a user ↓ ┆19┆┆89┆┄┄from the system. If John Doe gets a job with another ↓ ┆19┆┆89┆┄┄company, naturally the system manager will want to ↓ ┆19┆┆89┆┄┄prevent him from continuing to access the payroll files. ↓ ┆19┆┆89┆┄┄In removing a user from the system, the rmuser program ↓ ┆19┆┆89┆┄┄does the following:↲ ↲ . deletes the user's entry in the /┆a1┆etc/passwd┆e1┆ file↲ ↲ . removes the user's home directory↲ ↲ ┆8c┆┆83┆┆d0┆↓ ┆84┆However, rmuser will do nothing unless all of John's ↓ ┆19┆┆89┆┄┄files and directories are either removed from the ↓ ┆19┆┆89┆┄┄system, or moved to the directories of other users. It ↓ ┆19┆┆89┆┄┄is not a good idea to remove a user's files from the ↓ ┆19┆┆89┆┄┄system until they have been "saved" or copied to floppy ↓ ┆19┆┆89┆┄┄disks by one of the methods described in Section 6.6, ↓ ┆19┆┆89┆┄┄"Backing Up Your System". After you have made a backup ↓ ┆19┆┆89┆┄┄copy of the files, simply type:↲ ↲ cd /usr/johnd↲ rm -fr *↲ ↲ ┆84┆and all of John's files will be deleted.↲ ↲ ┆84┆After this, you can use the rmuser program to remove his ↓ ┆19┆┆89┆┄┄login from the system. Just type the command rmuser, ↓ ┆19┆┆89┆┄┄making sure that you are logged in as root. You should ↓ ┆19┆┆89┆┄┄see the message:↲ ↲ ┆a1┆┆05┆↲ ↲ ┆06┆****rmuser-remove a user from the system****↲ ↲ ┆a1┆┆05┆↲ ↲ ┆84┆followed by a description of what rmuser does. At the ↓ ┆19┆┆89┆┄┄end of the description you will see:↲ ↲ ┆a1┆┆05┆↲ ↲ ┆06┆Press ENTER when you are ready.↲ ↲ ┆a1┆┆05┆↲ ↲ ┆84┆You will be prompted for the name of the user you are ↓ ┆19┆┆89┆┄┄going to remove from the system.↲ ↲ ┆a1┆┆05┆↲ ↲ ┆06┆Enter name of id to be removed↲ ↲ ┆a1┆┆05┆↲ ↲ ┆84┆rmuser will then delete that user's entry in the ↓ ┆19┆┆89┆┄┄password file, remove his mail box, .┆a1┆profile┆e1┆ file, and ↓ ┆19┆┆89┆┄┄home directory.↲ ↲ ┆84┆Once again, before you remove a user ID from the system ↓ ┆19┆┆89┆┄┄you should make sure the user's mail box is empty, and ↓ ┆19┆┆89┆┄┄that all files belonging to that user ID have been saved ↓ ┆19┆┆89┆┄┄or deleted as required. The rmuser program will refuse ↓ ┆19┆┆89┆┄┄to remove a user ID or any of its files if one or more ↓ ┆19┆┆89┆┄┄of the following checks fails:↲ ↲ . ┆84┆The user name given is one of the "system" user names, ↓ ┆19┆┆8b┆┄┄such as root, sys, sysinfo, cron, or uucp.↲ ↲ ┆8c┆┆83┆┆c8┆↓ . ┆84┆The user ID is below 200. (Only system IDs have ↓ ┆19┆┆8b┆┄┄numbers below 200).↲ ↲ . ┆84┆The user's mail box exists and is not empty.↲ ↲ . ┆84┆The user's home directory contains files other than ↓ ┆19┆┆8b┆┄┄.┆a1┆profile┆e1┆.↲ ↲ You should now see the message:↲ ↲ ┆a1┆┆05┆↲ ↲ ┆06┆Removing user johnd from the system. CONFIRM? (y/n/q):↲ ↲ ┆a1┆┆05┆↲ ↲ ┆84┆If you answer "y", johnd will be removed from the ↓ ┆19┆┆89┆┄┄system.↲ ↲ ┆a1┆┆05┆↲ ↲ ┆06┆User johnd removed from the system↲ ↲ ┆a1┆┆05┆↲ ↲ ┆84┆If you answer "n" or "q" johnd's account will remain. ↓ ┆19┆┆89┆┄┄Rmuser will now give you a chance to remove another ↓ ┆19┆┆89┆┄┄user:↲ ↲ ┆a1┆┆05┆↲ ↲ ┆06┆Do you want to remove another user? (y/n/q):↲ ↲ ┆a1┆┆05┆↲ ↲ ┆84┆You may repeat the removal process. Of course, if you ↓ ┆19┆┆89┆┄┄have accidentally removed a user (remember, you can't ↓ ┆19┆┆89┆┄┄remove the user if he has any files on the system), no ↓ ┆19┆┆89┆┄┄harm is done. Just use mkuser to recreate his user ↓ ┆19┆┆89┆┄┄account.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.4 Controlling Access to Files and Directories↲ ↲ ┆84┆In this section, you will learn about one of your most ↓ ┆19┆┆89┆┄┄important responsibilities as system manager - ↓ ┆19┆┆89┆┄┄controlling your users' access to the files and ↓ ┆19┆┆89┆┄┄directories on your system. Because XENIX offers several ↓ ┆19┆┆89┆┄┄different tools for controlling access, you will have a ↓ ┆19┆┆89┆┄┄great deal of flexibility in restricting system usage ↓ ┆19┆┆89┆┄┄for both efficiency and security. In the previous two ↓ ┆19┆┆89┆┄┄sections you have been introduced to the way that XENIX ↓ ┆19┆┆89┆┄┄organizes the information on the system with files and ↓ ┆19┆┆89┆┄┄directories, and the way in which user accounts are ↓ ┆19┆┆89┆┄┄added and removed from the system. In this section the ↓ ┆19┆┆89┆┄┄following concepts are introduced:↲ ↲ . the definition of users, groups, and others↲ ↲ . ┆84┆the assignment of permissions to restrict file access↲ ↲ . the creation, mounting and unmounting of file systems↲ ↲ . the need for system security↲ ↲ You will learn the following procedures:↲ ↲ . ┆84┆how to determine the permission of files and ↓ ┆19┆┆8b┆┄┄directories↲ ↲ . ┆84┆how to set and change permissions to files and ↓ ┆19┆┆8b┆┄┄directories↲ ↲ . how to create and mount a file system↲ ↲ ↲ ┆b0┆┆a1┆6.4.1 Setting Permissions: Users, Groups, and Others↲ ↲ ┆84┆As system manager you will be responsible for adding and ↓ ┆19┆┆89┆┄┄removing user accounts on the system. Each user is given ↓ ┆19┆┆89┆┄┄a unique password to ensure privacy, and optionally, a ↓ ┆19┆┆89┆┄┄group affiliation that allows a number of users to share ↓ ┆19┆┆89┆┄┄access to files. You will also need to know something ↓ ┆19┆┆89┆┄┄about how permission to access files on the system is ↓ ┆19┆┆89┆┄┄assigned to users, groups, and others on the system.↲ ↲ ↲ ┆b0┆┆a1┆6.4.1.1 Users↲ ↲ ┆84┆Any user who has a valid login name and a password ↓ ┆19┆┆89┆┄┄recognized by the system may log in, and proceed to ↓ ┆19┆┆89┆┄┄access files, edit text, or run programs. But not every ↓ ┆19┆┆89┆┄┄user should have access to every file on the system.↲ ↲ ┆84┆For example, John Doe would probably not want every user ↓ ┆19┆┆89┆┄┄to be able to read or change the payroll files he ↓ ┆19┆┆89┆┄┄created in the previous section. So XENIX provides a ↓ ┆19┆┆89┆┄┄method of strictly controlling access to each individual ↓ ┆19┆┆89┆┄┄file and directory with permission or protection ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄settings. Naturally, every user has access to all the ↓ ┆19┆┆89┆┄┄files and directories which are in his home directory. ↓ ┆19┆┆89┆┄┄When the user logs in, this is where he is initially ↓ ┆19┆┆89┆┄┄positioned. Ordinarily, a user cannot access other files ↓ ┆19┆┆89┆┄┄and directories, unless the necessary permissions have ↓ ┆19┆┆89┆┄┄been set.↲ ↲ ┆84┆Only the super-user has unlimited power to access files ↓ ┆19┆┆89┆┄┄on the system, which makes logging in as "root" ↓ ┆19┆┆89┆┄┄temptingly convenient. But since the XENIX file ↓ ┆19┆┆89┆┄┄protection mechanism does not apply to the super-user, a ↓ ┆19┆┆89┆┄┄single mistake made by the super-user can cause massive ↓ ┆19┆┆89┆┄┄damage to other users' programs and data, and possibly ↓ ┆19┆┆89┆┄┄even bring down the entire system.↲ ↲ ↲ ┆b0┆┆a1┆6.4.1.2 Groups↲ ↲ ┆84┆Generally, a user will restrict access to the files and ↓ ┆19┆┆89┆┄┄directories he owns by setting the permission for that ↓ ┆19┆┆89┆┄┄file. This can prevent other users from changing, or ↓ ┆19┆┆89┆┄┄perhaps even reading, his files. However, some ↓ ┆19┆┆89┆┄┄directories and files need to be shared by several ↓ ┆19┆┆89┆┄┄users, while still remaining restricted from everyone ↓ ┆19┆┆89┆┄┄else. Thus XENIX offers a group ID which allows more ↓ ┆19┆┆89┆┄┄than one user the same access. In practice, you may ↓ ┆19┆┆89┆┄┄decide not to use this feature on a small system. XENIX ↓ ┆19┆┆89┆┄┄will automatically set the group ID as if every user ↓ ┆19┆┆89┆┄┄belonged to the same group; you may change this as ↓ ┆19┆┆89┆┄┄desired.↲ ↲ ↲ ┆b0┆┆a1┆6.4.1.3 Permissions↲ ↲ ┆84┆In order to get a look at the permission settings for ↓ ┆19┆┆89┆┄┄all the files in a directory, we can use a variant of ↓ ┆19┆┆89┆┄┄the lc command, 1. Here is a sample output:↲ ↲ -rw-rw---- 1 johnd 11515 Nov 17 14:21 file1↲ -rw-rw---- 1 johnd 12337 Nov 16 10:15 file2↲ -rwxrwx--x 1 freds 7712 Oct 10 09:02 program↲ ↲ ┆84┆The command gives you quite a lot of information. Just ↓ ┆19┆┆89┆┄┄to the right of the name of the user who created the ↓ ┆19┆┆89┆┄┄file, you will see the size of the file (information ↓ ┆19┆┆89┆┄┄which will be of special interest to you when you are ↓ ┆19┆┆89┆┄┄short on disk space and are trying to decide what files ↓ ┆19┆┆89┆┄┄to remove), the date and time when that file was either ↓ ┆19┆┆89┆┄┄created or last changed, and the name of the file or ↓ ┆19┆┆89┆┄┄directory.↲ ↲ ┆84┆Now look carefully at the pattern of ten letters and ↓ ┆19┆┆89┆┄┄dashes on the left. The first space is easily explained. ↓ ┆19┆┆89┆┄┄A "d" indicates a directory, a "-" means an ordinary ↓ ┆19┆┆89┆┄┄file. The other nine characters are a representation of ↓ ┆19┆┆89┆┄┄the nine possible combinations of permission which can ↓ ┆19┆┆89┆┄┄be assigned to any file. These nine can be divided into ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄three groups of three, read (r), write (w), and execute ↓ ┆19┆┆89┆┄┄(x) permissions for each of the following categories: ↓ ┆19┆┆89┆┄┄the "user" who is the owner of the file, the "group" ↓ ┆19┆┆89┆┄┄whose members have been defined by the system manager, ↓ ┆19┆┆89┆┄┄and "other" which includes everyone else. In each case a ↓ ┆19┆┆89┆┄┄dash (-) denies permission, and the letters "r," "w," ↓ ┆19┆┆89┆┄┄and "x" allow it. The entry↲ ↲ -rwxrwxrwx 1 johnd 32 Oct 19 10:00 public↲ ↲ ┆84┆indicates that everyone, owner, group, and other, has ↓ ┆19┆┆89┆┄┄full access rights to a file called ┆a1┆public┆e1┆ created by ↓ ┆19┆┆89┆┄┄John Doe.↲ ↲ ┆84┆Of course there are some files which John might want to ↓ ┆19┆┆89┆┄┄keep private. For example, the ┆a1┆list┆e1┆ file in his home ↓ ┆19┆┆89┆┄┄directory, which contains his personal "to do" list. So, ↓ ┆19┆┆89┆┄┄the permission setting on this file would look like ↓ ┆19┆┆89┆┄┄this:↲ ↲ -rw------- 1 johnd 3 Nov 18 07:31 list↲ ↲ ┆84┆Permissions are set for directories in the same way as ↓ ┆19┆┆89┆┄┄files, but you should note these differences. No user, ↓ ┆19┆┆89┆┄┄even the super-user, can write on a directory. The "x" ↓ ┆19┆┆89┆┄┄permission is taken to mean "search," rather than ↓ ┆19┆┆89┆┄┄execute in the case of directories. Search (x) ↓ ┆19┆┆89┆┄┄permission is required to cd to a directory or cat a ↓ ┆19┆┆89┆┄┄file in it.↲ ↲ ┆84┆Read (r) permission is required to use the lc command. ↓ ┆19┆┆89┆┄┄Write (w) permission is required to use mkdir or rmdir, ↓ ┆19┆┆89┆┄┄or create a file in a directory. Thus, if a directory's ↓ ┆19┆┆89┆┄┄permission is set "r-x", you can access all of its ↓ ┆19┆┆89┆┄┄files, subject to any permissions that might be set for ↓ ┆19┆┆89┆┄┄any individual files. If the directory is "rwx", you can ↓ ┆19┆┆89┆┄┄do anything in it. If a directory is "--x", you can only ↓ ┆19┆┆89┆┄┄access a file if you know its name.↲ ↲ ↲ ┆b0┆┆a1┆6.4.1.4 How to Change Permission Settings↲ ↲ ┆84┆When you add a file or directory, your XENIX system will ↓ ┆19┆┆89┆┄┄automatically set some default permissions for you. ↓ ┆19┆┆89┆┄┄These are read (r) and write (w) permission for the ↓ ┆19┆┆89┆┄┄user, read-only (r) for group and other permission ↓ ┆19┆┆89┆┄┄setting:↲ ↲ -rw-r--r--↲ ↲ ┆84┆If you decide to change a setting you will need to learn ↓ ┆19┆┆89┆┄┄the chmod or "change mode" command. To enter the ↓ ┆19┆┆89┆┄┄command, you will have to say whose permission is to ↓ ┆19┆┆89┆┄┄change ("u", "g", or "o" for user, group and other ↓ ┆19┆┆89┆┄┄respectively), and you will also have to indicate ↓ ┆19┆┆89┆┄┄whether you are adding (+) or removing (-) permission. ↓ ┆19┆┆89┆┄┄After this, give the type of permission (r, w, or x), ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄then the file or directory name. So, for example, to ↓ ┆19┆┆89┆┄┄change the file "program" from a permission setting of ↓ ┆19┆┆89┆┄┄read and write for user, group, and other (-rw-rw-rw-) ↓ ┆19┆┆89┆┄┄to also allow everyone to execute the file you would ↓ ┆19┆┆89┆┄┄need to type:↲ ↲ $ chmod ugo+x program↲ ↲ ┆84┆Or, instead of "ugo" you could type the letter "a" for ↓ ┆19┆┆89┆┄┄all:↲ ↲ $ chmod a+x program↲ ↲ ┆84┆Now, to take read and write permission away from ↓ ┆19┆┆89┆┄┄everyone else besides you and the members of your group, ↓ ┆19┆┆89┆┄┄you can use:↲ ↲ $ chmod o-rw program↲ ↲ ┆84┆If you get the order, or syntax, of this command wrong, ↓ ┆19┆┆89┆┄┄XENIX will sometimes answer with a bit of help:↲ ↲ Usage: chmod ugoa +-= rwxtugo file↲ ↲ ┆84┆The items in brackets are "options". You will not need ↓ ┆19┆┆89┆┄┄the other options besides "rwx" in the last set of ↓ ┆19┆┆89┆┄┄brackets. After using chmod always try the 1 command to ↓ ┆19┆┆89┆┄┄check the results. If you make a mistake, no harm is ↓ ┆19┆┆89┆┄┄done; just change the permissions again.↲ ↲ ↲ ┆b0┆┆a1┆6.4.2 The File System↲ ↲ ┆84┆XENIX performs the task of disk storage management for ↓ ┆19┆┆89┆┄┄all users of the system. It allocates disk space upon ↓ ┆19┆┆89┆┄┄demand, keeps track of where on the disk the data is ↓ ┆19┆┆89┆┄┄written and retrieves any part of it when given the ↓ ┆19┆┆89┆┄┄"pathname" of the file. When a file is no longer needed, ↓ ┆19┆┆89┆┄┄it can be deleted and XENIX returns the space it ↓ ┆19┆┆89┆┄┄occupied to the pool of available free space. A disk ↓ ┆19┆┆89┆┄┄device contains not only the files themselves, but also ↓ ┆19┆┆89┆┄┄the information needed to locate the files on the disk ↓ ┆19┆┆89┆┄┄and manage them. Together, these are called the "file ↓ ┆19┆┆89┆┄┄system". A simple XENIX system contains one disk device ↓ ┆19┆┆89┆┄┄which is set up as a single file system, with the ↓ ┆19┆┆89┆┄┄exception of a small area reserved for swapping, the ↓ ┆19┆┆89┆┄┄process of switching data back and forth from the disk ↓ ┆19┆┆89┆┄┄to the main memory of the computer. Instead of being ↓ ┆19┆┆89┆┄┄used as a single storage area, however, the disk may be ↓ ┆19┆┆89┆┄┄partitioned into several distinct areas. Each partition ↓ ┆19┆┆89┆┄┄may be a separate file system.↲ ↲ ↲ ┆b0┆┆a1┆6.4.3 Creating File Systems↲ ↲ ┆84┆You may find it convenient to set the system up so that ↓ ┆19┆┆89┆┄┄a file system is resident on a floppy disk. To do this, ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄you must create the file system on the floppy with the ↓ ┆19┆┆89┆┄┄mkfs command. Be sure you have a formatted floppy disk ↓ ┆19┆┆89┆┄┄available, with nothing of value on it; it must have a ↓ ┆19┆┆89┆┄┄write-enable tab. (For directions on how to format a new ↓ ┆19┆┆89┆┄┄disk, see Section 6.6). If a file system already exists ↓ ┆19┆┆89┆┄┄on disk, it will be destroyed by this procedure. ↓ ┆19┆┆89┆┄┄Remember, each of the devices on your system has a name, ↓ ┆19┆┆89┆┄┄and each device has a corresponding file by the same name ↓ ┆19┆┆89┆┄┄in the /┆a1┆dev┆e1┆ directory. The floppy disk drives are called ↓ ┆19┆┆89┆┄┄"fd0", "fd1", and so forth. (Hard disk drives are named ↓ ┆19┆┆89┆┄┄"hd0", "hd1", etc.). Insert a floppy disk in one of the ↓ ┆19┆┆89┆┄┄floppy drives, and enter one of the following command ↓ ┆19┆┆89┆┄┄lines. Be sure to give XENIX the correct drive name and ↓ ┆19┆┆89┆┄┄note whether you have a single-sided or double-sided ↓ ┆19┆┆89┆┄┄floppy disk.↲ ↲ ┆84┆If you have a double-sided disk, you will need to enter ↓ ┆19┆┆89┆┄┄the command line:↲ ↲ $ /etc/mkfs /dev/rfd0 2448 2 16↲ ↲ If you have a single-sided disk, use:↲ ↲ $ /etc/mkfs /dev/rfd0 1216 2 16↲ ↲ ┆84┆The numbers "2448" and "1216" represent the total number ↓ ┆19┆┆89┆┄┄of disk blocks on the floppy disk for double- and ↓ ┆19┆┆89┆┄┄single-sided disks respectively. The numbers "2" and ↓ ┆19┆┆89┆┄┄"16" are magic numbers which tell XENIX how to arrange ↓ ┆19┆┆89┆┄┄information on the disk.↲ ↲ ↲ ┆b0┆┆a1┆6.4.4 Mounted File Systems↲ ↲ ┆84┆Once you have created file systems on floppy disks, you ↓ ┆19┆┆89┆┄┄will have to use the mount command in order to access ↓ ┆19┆┆89┆┄┄them. XENIX must be told about any file systems other ↓ ┆19┆┆89┆┄┄than the ┆a1┆root┆e1┆ system, which is always present on the ↓ ┆19┆┆89┆┄┄system. If you have several often used floppy-based file ↓ ┆19┆┆89┆┄┄systems, you can place the mount command and the names ↓ ┆19┆┆89┆┄┄of the file systems in the /┆a1┆etc/rc┆e1┆ file, which is read ↓ ┆19┆┆89┆┄┄by the system when it is first booted.↲ ↲ ┆84┆To mount a file system on the floppy in drive 0 onto the ↓ ┆19┆┆89┆┄┄directory called /┆a1┆acct.records┆e1┆ type:↲ ↲ $ /etc/mount /dev/fd0 /acct.records↲ ↲ ┆84┆The directory you are mounting must be empty and not ↓ ┆19┆┆89┆┄┄your current, working directory. Once you have typed ↓ ┆19┆┆89┆┄┄this, ┆a1┆acct.records┆e1┆ becomes the top level directory on ↓ ┆19┆┆89┆┄┄the floppy disk. Any new directories you create in ↓ ┆19┆┆89┆┄┄┆a1┆acct.records┆e1┆ are resident on the floppy disk. The ↓ ┆19┆┆89┆┄┄mounted file system is attached to the root system.↲ ↲ Before removing the mounted floppy, type:↲ ↲ ┆8c┆┆83┆┆c8┆↓ $ /etc/umount /dev/fd0↲ ↲ ┆84┆This "unmounts" the file system and leaves it in a ↓ ┆19┆┆89┆┄┄consistent state.↲ ↲ ↲ ┆b0┆┆a1┆6.4.5 XENIX System Security↲ ↲ ┆84┆Although security is more of an issue on larger systems, ↓ ┆19┆┆89┆┄┄every system manager must take into consideration the ↓ ┆19┆┆89┆┄┄protection of data and programs from unauthorized ↓ ┆19┆┆89┆┄┄inspection or change. This concern may be present no ↓ ┆19┆┆89┆┄┄matter how many regular users you have. Even if you have ↓ ┆19┆┆89┆┄┄only one terminal attached to your XENIX system, you may ↓ ┆19┆┆89┆┄┄have different users authorized to access the system for ↓ ┆19┆┆89┆┄┄different tasks at different times. The key to system ↓ ┆19┆┆89┆┄┄security is to use XENIX tools to maximum advantage. ↓ ┆19┆┆89┆┄┄Intelligent decisions about the following can make a big ↓ ┆19┆┆89┆┄┄different in overall system security:↲ ↲ . the establishment of user accounts and group ID↲ ↲ . initial password selection and changing of passwords↲ ↲ . ┆84┆the assignment of permissions to maximize file ↓ ┆19┆┆8b┆┄┄protection, while still allowing convenient access to ↓ ┆19┆┆8b┆┄┄user files and directories.↲ ↲ ┆84┆In addition, you should consider taking physical ↓ ┆19┆┆89┆┄┄security precautions:↲ ↲ . removing the key from the hard disk↲ ↲ . organizing and locking up floppies↲ ↲ . ┆84┆making sure all your users log out when they are ↓ ┆19┆┆8b┆┄┄finished working↲ ↲ . protecting the work area from intrusion↲ ↲ . ┆84┆protecting the computer and disks from physical damage ↓ ┆19┆┆8b┆┄┄through exposure to cigarette smoke, spilled coffee, ↓ ┆19┆┆8b┆┄┄or the use of ball point pens to make notations on ↓ ┆19┆┆8b┆┄┄disk labels, etc.↲ ↲ . ┆84┆keeping some backups off-site, in case of disaster in ↓ ┆19┆┆8b┆┄┄the computer area.↲ ↲ ┆84┆Once again, be sure that you limit the use of the super-↓ ┆19┆┆89┆┄┄user login, to minimize the risk of accidentally ↓ ┆19┆┆89┆┄┄damaging system files and programs.↲ ↲ ↲ ┆b0┆┆a1┆6.4.5.1 Protection and Permission↲ ↲ ┆84┆When considering the assignment of permissions, note the ↓ ┆19┆┆89┆┄┄special case of access permissions for directories. ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄Remember that the execute permission bit for directories ↓ ┆19┆┆89┆┄┄grants permission to search the directory for a given ↓ ┆19┆┆89┆┄┄file during the scanning of a pathname. If a user has ↓ ┆19┆┆89┆┄┄execute permission, but not read permission, to a given ↓ ┆19┆┆89┆┄┄directory, he may access files in that directory, even ↓ ┆19┆┆89┆┄┄though he is unable to read the contents of the ↓ ┆19┆┆89┆┄┄directory. Write permission on a directory means that ↓ ┆19┆┆89┆┄┄the user may create and delete files in that directory.↲ ↲ ┆84┆The capacity of the "super-user" to read and write to ↓ ┆19┆┆89┆┄┄any file in any directory, and change any permission ↓ ┆19┆┆89┆┄┄settings can present serious security problems. The root ↓ ┆19┆┆89┆┄┄password can only be given to individuals who are ↓ ┆19┆┆89┆┄┄authorized to read and change any file in the system. ↓ ┆19┆┆89┆┄┄Also, the use of the root login should be severely ↓ ┆19┆┆89┆┄┄restricted because of potential damage to the system. ↓ ┆19┆┆89┆┄┄Even the system manager must be extremely cautious about ↓ ┆19┆┆89┆┄┄operations undertaken while logged in as root.↲ ↲ ┆84┆To ensure both data privacy and integrity, it is usually ↓ ┆19┆┆89┆┄┄sufficient to set the permission on your files so that ↓ ┆19┆┆89┆┄┄they are inaccessible to others. However, if you have ↓ ┆19┆┆89┆┄┄some special reason to protect a text file, you can use ↓ ┆19┆┆89┆┄┄the crypt command to "encode" document text. This should ↓ ┆19┆┆89┆┄┄not normally be required on a system where "read" access ↓ ┆19┆┆89┆┄┄has been limited.↲ ↲ ┆84┆Needless to say, the system manager must be careful to ↓ ┆19┆┆89┆┄┄assign the correct protection to the files under his ↓ ┆19┆┆89┆┄┄control. In particular, it is necessary that special ↓ ┆19┆┆89┆┄┄device files be protected from writing, and probably ↓ ┆19┆┆89┆┄┄reading, by ordinary users when sensitive files ↓ ┆19┆┆89┆┄┄belonging to other users are stored on the system. It is ↓ ┆19┆┆89┆┄┄easy to write programs that examine and change files by ↓ ┆19┆┆89┆┄┄accessing the device on which the files are resident.↲ ↲ ↲ ┆b0┆┆a1┆6.4.5.2 Password Security↲ ↲ ┆84┆You should discourage users from choosing passwords that ↓ ┆19┆┆89┆┄┄are easily remembered, and hence readily guessed: these ↓ ┆19┆┆89┆┄┄tend to be short, from a limited alphabet, often found ↓ ┆19┆┆89┆┄┄in the dictionary, and frequently something obvious like ↓ ┆19┆┆89┆┄┄the user's own nickname or license plate number. They ↓ ┆19┆┆89┆┄┄should be reminded that this defeats the idea of having ↓ ┆19┆┆89┆┄┄passwords. Passwords should be at least six characters ↓ ┆19┆┆89┆┄┄long and randomly chosen from an alphabet which includes ↓ ┆19┆┆89┆┄┄digits and special characters.↲ ↲ ↲ ┆b0┆┆a1┆6.4.5.3 Restating the Obvious↲ ↲ ┆84┆The most obvious but often neglected security problem ↓ ┆19┆┆89┆┄┄results from users failing to log out of the system ↓ ┆19┆┆89┆┄┄when they finish their work, leaving all the files to ↓ ┆19┆┆89┆┄┄which they have access vulnerable to unauthorized use. ↓ ┆19┆┆89┆┄┄Inexperienced users should be repeatedly reminded to log ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄out. Restricting access to the work area, locking up ↓ ┆19┆┆89┆┄┄archives of floppy-based data and programs, and removing ↓ ┆19┆┆89┆┄┄the key to the hard disk are simple protective measures ↓ ┆19┆┆89┆┄┄that can be taken if a high level of security is ↓ ┆19┆┆89┆┄┄required.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.5 Keeping Your XENIX System Healthy↲ ↲ ┆84┆Keeping your XENIX system running smoothly depends ↓ ┆19┆┆89┆┄┄largely on two factors:↲ ↲ . ┆84┆maintaining file system integrity, that is, having ↓ ┆19┆┆8b┆┄┄"clean" file systems↲ ↲ . ┆84┆ensuring that adequate free disk space is available ↓ ┆19┆┆8b┆┄┄to the users↲ ↲ ┆84┆In this section you will learn about XENIX processes - ↓ ┆19┆┆89┆┄┄what XENIX does with the programs and other tasks on the ↓ ┆19┆┆89┆┄┄system. Some automatic system-checking programs called ↓ ┆19┆┆89┆┄┄"daemons" are introduced, along with an important XENIX ↓ ┆19┆┆89┆┄┄system file called /┆a1┆etc/rc┆e1┆. Then, you will be introduced ↓ ┆19┆┆89┆┄┄to a number of XENIX tools which will aid you, the ↓ ┆19┆┆89┆┄┄system manager, in performing system maintenance tasks. ↓ ┆19┆┆89┆┄┄These programs help you clean up files and file systems ↓ ┆19┆┆89┆┄┄by reporting how much disk space is being used and ↓ ┆19┆┆89┆┄┄helping you locate little used files. Finally, you will ↓ ┆19┆┆89┆┄┄learn how to communicate with the other users on the ↓ ┆19┆┆89┆┄┄system, so that you can enlist their cooperation in ↓ ┆19┆┆89┆┄┄preserving the health of the system.↲ ↲ ↲ ┆b0┆┆a1┆6.5.1 Processes↲ ↲ ┆84┆All functions running on the system - including system ↓ ┆19┆┆89┆┄┄and user programs, editing, etc. - are "processes". ↓ ┆19┆┆89┆┄┄Several users may each have several processes running ↓ ┆19┆┆89┆┄┄simultaneously and it is often necessary to check ↓ ┆19┆┆89┆┄┄whether certain processes are running, in order to stop ↓ ┆19┆┆89┆┄┄or "kill" them. The ps, or "process status", command can ↓ ┆19┆┆89┆┄┄be used to list the processes currently running. The ↓ ┆19┆┆89┆┄┄output of ps is the list of processes running from the ↓ ┆19┆┆89┆┄┄terminal at which you typed the command. When, however, ↓ ┆19┆┆89┆┄┄you add the switch "-a":↲ ↲ ps -a↲ ↲ ┆84┆your output will be all the processes running on the ↓ ┆19┆┆89┆┄┄system:↲ ↲ PID TTY TIME CMD↲ 167 co 0:04↲ 603 01 1:01 vi file.c↲ ↲ ┆84┆The first column is the process ID, the name by which ↓ ┆19┆┆89┆┄┄the process is identified if, for example, you need to ↓ ┆19┆┆89┆┄┄kill it. The second column is the number of the terminal ↓ ┆19┆┆89┆┄┄from which the process is running; note that several ↓ ┆19┆┆89┆┄┄processes may be running from a single terminal. The ↓ ┆19┆┆89┆┄┄next column is the total time for which the process has ↓ ┆19┆┆89┆┄┄been running. Finally, the name of the command or ↓ ┆19┆┆89┆┄┄program is given. You will often have use for the ps ↓ ┆19┆┆89┆┄┄command while doing system mainenance.↲ ↲ ↲ ┆8c┆┆83┆┆d8┆↓ ┆b0┆┆a1┆6.5.1.1 Daemon Processes↲ ↲ ┆84┆In addition to those programs which you yourself will ↓ ┆19┆┆89┆┄┄use in the course of your system maintenance work, you ↓ ┆19┆┆89┆┄┄should be aware that there are also a few other programs ↓ ┆19┆┆89┆┄┄that run automatically whenever you use your XENIX ↓ ┆19┆┆89┆┄┄system. These are called "daemons" (pronounced like ↓ ┆19┆┆89┆┄┄"demons"). These daemon programs periodically check the ↓ ┆19┆┆89┆┄┄system or perform basic system functions. Some examples ↓ ┆19┆┆89┆┄┄of daemons are:↲ ↲ . ┆84┆update "updates" the disk by automatically writing ↓ ┆19┆┆8b┆┄┄information from memory back to your disk every thirty ↓ ┆19┆┆8b┆┄┄seconds. This ensures that in the unlikely event that ↓ ┆19┆┆8b┆┄┄your system "crashes" or halts abnormally, the ↓ ┆19┆┆8b┆┄┄information recorded on disk will be as current as ↓ ┆19┆┆8b┆┄┄possible.↲ ↲ . ┆84┆lpd superintends the operation of the lineprinter.↲ ↲ . ┆84┆cron acts like an alarm clock, allowing you to execute ↓ ┆19┆┆8b┆┄┄commands and jobs at times you specify in advance. It ↓ ┆19┆┆8b┆┄┄repeatedly looks in a file called /┆a1┆usr/lib/crontab┆e1┆ for ↓ ┆19┆┆8b┆┄┄instructions to perform these functions.↲ ┆19┆┆8b┆┄┄↲ ↲ ┆a1┆┆b0┆6.5.1.2 The /etc/rc File↲ ↲ ┆84┆Ordinarily, the commands to start these daemons running ↓ ┆19┆┆89┆┄┄are put in the /┆a1┆┆a1┆┆a1┆e┆e1┆┆a1┆tc/rc┆e1┆ file, which runs automatically at ↓ ┆19┆┆89┆┄┄the time you boot XENIX. The /┆a1┆etc/rc┆e1┆ file also contains ↓ ┆19┆┆89┆┄┄directions to the system to perform other functions. For ↓ ┆19┆┆89┆┄┄example, it may contain a message that greets you when ↓ ┆19┆┆89┆┄┄you log in, or direct the system to ask you for the ↓ ┆19┆┆89┆┄┄time. If you have file systems which need to be mounted ↓ ┆19┆┆89┆┄┄the mount commands can also be placed in /┆a1┆etc/rc┆e1┆, so ↓ ┆19┆┆89┆┄┄that these file systems are automatically mounted when ↓ ┆19┆┆89┆┄┄the system is booted. If you are logged in as root, you ↓ ┆19┆┆89┆┄┄may edit the /┆a1┆etc/rc┆e1┆ file, to add the names of file ↓ ┆19┆┆89┆┄┄systems which need to be mounted or change the system ↓ ┆19┆┆89┆┄┄greeting message. You can also add commands to perform ↓ ┆19┆┆89┆┄┄any functions you decide must be repeated whenever the ↓ ┆19┆┆89┆┄┄system is rebooted.↲ ↲ ↲ ┆b0┆┆a1┆6.5.2 The Importance of Disk Space↲ ↲ ┆84┆Available disk space rapidly becomes a precious ↓ ┆19┆┆89┆┄┄commodity on any computer system. As users compile ↓ ┆19┆┆89┆┄┄programs, edit files, or perform other tasks, they are ↓ ┆19┆┆89┆┄┄competing for this valuable resource. On a typical ↓ ┆19┆┆89┆┄┄system, the potential for running out of free disk space ↓ ┆19┆┆89┆┄┄is very high, and when this actually occurs, no new ↓ ┆19┆┆89┆┄┄files can be created, nor can any existing files expand. ↓ ┆19┆┆89┆┄┄If possible, each file system should contain ↓ ════════════════════════════════════════════════════════════════════════ ↓ ┆19┆┆89┆┄┄approximately 15% free space, more if usage of the file ↓ ┆19┆┆89┆┄┄system fluctuates, less if it is relatively stable. It ↓ ┆19┆┆89┆┄┄is extremely important that you anticipate the risk of ↓ ┆19┆┆89┆┄┄running out of space. Regard the task of monitoring disk ↓ ┆19┆┆89┆┄┄space as an essential part of preventive maintenance.↲ ↲ ┆84┆XENIX offers some techniques for finding out how much ↓ ┆19┆┆89┆┄┄free space exists in a particular file system, and ↓ ┆19┆┆89┆┄┄determining which files might be candidates for ↓ ┆19┆┆89┆┄┄deletion if there is a shortage of space. The XENIX ↓ ┆19┆┆89┆┄┄commands that will help you determine the status of disk ↓ ┆19┆┆89┆┄┄space on a file system and help you remove unwanted ↓ ┆19┆┆89┆┄┄files are:↲ ↲ df disk free↲ du disk usage↲ find find files↲ ↲ ┆84┆Each of these is introduced briefly in the following ↓ ┆19┆┆89┆┄┄sections. However, you will probably also want to refer ↓ ┆19┆┆89┆┄┄to the XENIX System Reference volume for more ↓ ┆19┆┆89┆┄┄information.↲ ↲ ↲ ┆b0┆┆a1┆6.5.2.1 The df Command↲ ↲ ┆84┆This command prints out the number of free blocks ↓ ┆19┆┆89┆┄┄available in whatever file system is specified. If no ↓ ┆19┆┆89┆┄┄file system is specified, the free space in all normally ↓ ┆19┆┆89┆┄┄mounted file systems is printed. You can just type in↲ ↲ df↲ ↲ or you can specify a file system:↲ ↲ df /dev/root↲ ↲ The output will look something like:↲ ↲ /dev/root 7008↲ ↲ ┆84┆This indicates that the root file system has 7008 free ↓ ┆19┆┆89┆┄┄disk blocks.↲ ↲ ┆84┆Naturally, you must know the size of your hard or floppy ↓ ┆19┆┆89┆┄┄disk in blocks to determine what percentage of the total ↓ ┆19┆┆89┆┄┄disk these numbers represent. The table below summarizes ↓ ┆19┆┆89┆┄┄the sizes of typical floppy and hard disks in both ↓ ┆19┆┆89┆┄┄blocks and kilobytes:↲ ┆a1┆ ↲ ↲ ┆a1┆ ┆06┆ DISK STATISTICS ╞ ↲ ┆a2┆┆e2┆┆a1┆ Media Blocks Kbytes ↲ ┆06┆ ┆a1┆ 8" single floppy 1216 608 ↲ ┆a1┆ 8" double floppy 2448 1224 ↲ ┆a1┆ 8-meg. hard 14,909 7454.5 ↲ ┆a1┆ 12-meg. hard 20,961 10480.5 ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆84┆With experience, you will come to know your system usage ↓ ┆19┆┆89┆┄┄well enough to know whether disk space is critical.↲ ↲ ↲ ┆b0┆┆a1┆6.5.2.2 The du Command↲ ↲ ┆84┆Let's suppose that you discover when you use the df ↓ ┆19┆┆89┆┄┄command that you have a shortage of disk space. Now you ↓ ┆19┆┆89┆┄┄have to do some detective work to find out where space ↓ ┆19┆┆89┆┄┄may be wasted on your system. The command du gives the ↓ ┆19┆┆89┆┄┄number of blocks that are used by files in the specified ↓ ┆19┆┆89┆┄┄directory and each of its subdirectories. If you use du ↓ ┆19┆┆89┆┄┄with no filename specified, it will report the size in ↓ ┆19┆┆89┆┄┄blocks, of every directory and file, starting at the ↓ ┆19┆┆89┆┄┄current directory. Or, you can give it a file or ↓ ┆19┆┆89┆┄┄directory name. In this case, you would probably search ↓ ┆19┆┆89┆┄┄the entire /┆a1┆usr┆e1┆ directory for excessively large files ↓ ┆19┆┆89┆┄┄and directories. Part of the output might look like ↓ ┆19┆┆89┆┄┄this:↲ ↲ du /usr↲ 208 /usr/anthonys/admin↲ 378 /usr/anthonys/mp↲ 999 /usr/anthonys/junk↲ 1585 /usr/anthonys↲ 26 /usr/johnd/memos↲ 235 /usr/johnd/payroll↲ 261 /usr/johnd↲ ↲ ↲ ┆b0┆┆a1┆6.5.2.3 The find Command↲ ↲ ┆84┆The find command is an extremely useful tool for finding ↓ ┆19┆┆89┆┄┄files by size, date, owner, and date of last access. It ↓ ┆19┆┆89┆┄┄will help you locate old files that the user rarely or ↓ ┆19┆┆89┆┄┄never accesses but has neglected to remove, or files ↓ ┆19┆┆89┆┄┄that seem excessively large. Incidentally, you can also ↓ ┆19┆┆89┆┄┄use the find command to locate a file if you have ↓ ┆19┆┆89┆┄┄forgotten where it is in your directory hierarchy.↲ ↲ ┆84┆In the preceding example we used the du command to ↓ ┆19┆┆89┆┄┄search /┆a1┆usr┆e1┆ for possible wasted space, and discovered a ↓ ┆19┆┆89┆┄┄suspicious file named /┆a1┆usr/anthonys/junk┆e1┆ with a size of ↓ ┆19┆┆89┆┄┄999 blocks. You could also use the find command with the ↓ ┆19┆┆89┆┄┄"-atime" specification followed by a number of days ↓ ┆19┆┆89┆┄┄within which a file hasn't been accessed. You may ↓ ┆19┆┆89┆┄┄discover that the file /┆a1┆usr/anthonys/junk┆e1┆ has not been ↓ ┆19┆┆89┆┄┄accessed for a month. It is probably safe to remove it.↲ ↲ ┆84┆Occasionally, while you are working on the system you ↓ ┆19┆┆89┆┄┄may inexplicably get the message:↲ ↲ memory fault -- core dumped↲ ↲ ┆84┆This does not mean that there is something wrong with ↓ ┆19┆┆89┆┄┄your system. An error in a program causes XENIX to ↓ ════════════════════════════════════════════════════════════════════════ ↓ ┆19┆┆89┆┄┄automatically store output in a binary file called ┆a1┆core┆e1┆ ↓ ┆19┆┆89┆┄┄in your current directory. Most users will not bother to ↓ ┆19┆┆89┆┄┄access this file, but will often forget to delete it; ↓ ┆19┆┆89┆┄┄this is often a good place to look for wasted disk space. ↓ ┆19┆┆89┆┄┄(Files named ┆a1┆tmp┆e1┆ are other likely candidates).↲ ↲ ┆84┆In the following example, the find command can be used ↓ ┆19┆┆89┆┄┄to search for all the files named ┆a1┆core┆e1┆ which have not ↓ ┆19┆┆89┆┄┄been accessed for a week.↲ ↲ find /usr/anthonys -name core -atime +7 -print↲ ↲ ┆84┆The specification "-name" means you want the find ↓ ┆19┆┆89┆┄┄command to look for a file by the name which follows. ↓ ┆19┆┆89┆┄┄The specification "-atime" means you want to search for ↓ ┆19┆┆89┆┄┄files which have not been accessed within the number of ↓ ┆19┆┆89┆┄┄days which follow. Be sure to specify "-print", or the ↓ ┆19┆┆89┆┄┄find command will not let you know what it found. ↓ ┆19┆┆89┆┄┄Because the various forms of the find command are rather ↓ ┆19┆┆89┆┄┄complicated, it is a good idea to consult the XENIX ↓ ┆19┆┆89┆┄┄System Reference volume for more details.↲ ↲ ↲ ┆b0┆┆a1┆6.5.2.4 The quot Command↲ ↲ ┆84┆The quot command is another useful reporting tool. It ↓ ┆19┆┆89┆┄┄prints the number of blocks currently owned by each user ↓ ┆19┆┆89┆┄┄in the named file system. If you type↲ ↲ quot -n /filesys↲ ↲ ┆84┆it will give you a list of all files and their owners in ↓ ┆19┆┆89┆┄┄the file system called ┆a1┆filesys┆e1┆.↲ ↲ ↲ ┆b0┆┆a1┆6.5.3 Communicating With Other Users↲ ↲ ┆84┆Enlisting the cooperation of your users is, in a way, ↓ ┆19┆┆89┆┄┄one of your most powerful maintenance tools. ↓ ┆19┆┆89┆┄┄Communication with the other system users can be a ↓ ┆19┆┆89┆┄┄tactic to aid you in your quest for free disk space. For ↓ ┆19┆┆89┆┄┄example, the /┆a1┆etc/motd┆e1┆ file, which contains the "message ↓ ┆19┆┆89┆┄┄of the day", can be edited to gently remind users that ↓ ┆19┆┆89┆┄┄space is low and that old files should be deleted. If, ↓ ┆19┆┆89┆┄┄in using the tools described above, you discover that ↓ ┆19┆┆89┆┄┄one particular user has more than his fair share of disk ↓ ┆19┆┆89┆┄┄space, try a message directed at the offender, using the ↓ ┆19┆┆89┆┄┄mail command, if the mail program is available on your ↓ ┆19┆┆89┆┄┄system.↲ ↲ mail anthonys↲ It's time to clean up your files! <CONTROL-D>↲ ↲ ┆84┆You can also reach all the users who are logged in ↓ ┆19┆┆89┆┄┄immediately with the wall (write all) command, if it is ↓ ┆19┆┆89┆┄┄available on your system.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ wall↲ There is a shortage of free disk space.↲ Clean up your unused files.<CONTROL-D>↲ ↲ ┆84┆Try to reserve the use of wall for emergencies, however, ↓ ┆19┆┆89┆┄┄because it disrupts other users. Also, remember to edit ↓ ┆19┆┆89┆┄┄your /┆a1┆etc/motd┆e1┆ file daily, so that the users don't come ↓ ┆19┆┆89┆┄┄to expect old and unreliable information.↲ ↲ ↲ ┆b0┆┆a1┆6.5.4 File System Integrity↲ ↲ ┆84┆In addition to the problem of maintaining adequate disk ↓ ┆19┆┆89┆┄┄space, there is the possibility that a file system may ↓ ┆19┆┆89┆┄┄develop inconsistencies. A file system consists of ↓ ┆19┆┆89┆┄┄files, and these files, in turn, consist of blocks of ↓ ┆19┆┆89┆┄┄bytes. If a block of information is bad, then the file, ↓ ┆19┆┆89┆┄┄and potentially the entire file system, is compromised. ↓ ┆19┆┆89┆┄┄A file system's integrity is compromised when it is ↓ ┆19┆┆89┆┄┄internally inconsistent. This occurs either when the ↓ ┆19┆┆89┆┄┄system has not been shut down properly or if there is a ↓ ┆19┆┆89┆┄┄hardware error due to faulty disk drives or floppy ↓ ┆19┆┆89┆┄┄disks.↲ ↲ ┆84┆A program called fsck, or file system check, is the tool ↓ ┆19┆┆89┆┄┄XENIX uses to check the consistency of file systems and, ↓ ┆19┆┆89┆┄┄if necessary, repair them. If the system has not been ↓ ┆19┆┆89┆┄┄shut down normaly, the next time you attempt to boot the ↓ ┆19┆┆89┆┄┄system you will be asked if the system should proceed ↓ ┆19┆┆89┆┄┄with "cleaning". You should always answer yes to this ↓ ┆19┆┆89┆┄┄question. If your file system is "dirty", that is, ↓ ┆19┆┆89┆┄┄inconsistent, all of your files are at risk.↲ ↲ ┆84┆The fsck program is responsible for file system ↓ ┆19┆┆89┆┄┄cleaning. If you have reason to suspect that file system ↓ ┆19┆┆89┆┄┄inconsistency is responsible for any abnormal behavior, ↓ ┆19┆┆89┆┄┄you should invoke fsck, followed by the name of the ↓ ┆19┆┆89┆┄┄questionable file system. However, you should not use ↓ ┆19┆┆89┆┄┄fsck indiscriminately, because it will occasionally ↓ ┆19┆┆89┆┄┄delete damaged files during its cleanup process.↲ ↲ Here is an example:↲ ↲ fsck /dev/hd0↲ ↲ ** Phase 1 - Check Blocks↲ ** Phase 2 - Check Pathnames↲ ** Phase 3 - check Connectivity↲ ** Phase 4 - Check Reference Counts↲ ** Phase 5 - Check Free List↲ 426 files 6753 blocks 7008 free↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.6 Backing Up Your System↲ ↲ ┆84┆The importance of "backing up" or making copies of all ↓ ┆19┆┆89┆┄┄the files on your system cannot be overemphasized. ↓ ┆19┆┆89┆┄┄Backups are the only insurance your users have against ↓ ┆19┆┆89┆┄┄time-consuming and costly losses of their programs and ↓ ┆19┆┆89┆┄┄data. You should no more consider skipping a scheduled ↓ ┆19┆┆89┆┄┄backup, because you think you won't be needing it, than ↓ ┆19┆┆89┆┄┄you would consider skipping an insurance payment. In ↓ ┆19┆┆89┆┄┄addition to inevitable, everyday user mistakes - ↓ ┆19┆┆89┆┄┄deleting, changing, or writing over files, there are ↓ ┆19┆┆89┆┄┄more catastrophic possibilities: accidental damage to ↓ ┆19┆┆89┆┄┄XENIX system software or hardware failure. If you are ↓ ┆19┆┆89┆┄┄lucky, you will rarely need to use your backup copies, ↓ ┆19┆┆89┆┄┄but nonetheless you must have a systematic plan for ↓ ┆19┆┆89┆┄┄scheduling backups. You must also determine how often a ↓ ┆19┆┆89┆┄┄full backup is required, and decide where, and for how ↓ ┆19┆┆89┆┄┄long, you will store your backups. Some suggestions are ↓ ┆19┆┆89┆┄┄provided here, but you will have to assess the needs of ↓ ┆19┆┆89┆┄┄the users on your own system.↲ ↲ ┆84┆The XENIX system offers several ways to make copies of ↓ ┆19┆┆89┆┄┄system and user files. Which method or methods you ↓ ┆19┆┆89┆┄┄choose will depend on several factors: whether you have ↓ ┆19┆┆89┆┄┄a hard disk or floppy-only system, how often the ↓ ┆19┆┆89┆┄┄contents of your disks change significantly and the ↓ ┆19┆┆89┆┄┄total size of your system. The following procedures are ↓ ┆19┆┆89┆┄┄discussed in this section:↲ ↲ . ┆84┆using the tar program to copy the contents of a file ↓ ┆19┆┆8b┆┄┄system↲ ↲ . ┆84┆using the dump/restor commands to backup and restore ↓ ┆19┆┆8b┆┄┄file systems↲ ↲ ↲ ┆b0┆┆a1┆6.6.1 Formatting Floppy Disks↲ ↲ ┆84┆Before you can use a floppy disk, you must format it, ↓ ┆19┆┆89┆┄┄using the command:↲ ↲ /etc/format /dev/fdall↲ ↲ ┆84┆The floppy disk can now be used by the tar or dump ↓ ┆19┆┆89┆┄┄command.↲ ↲ ↲ ┆b0┆┆a1┆6.6.2 Archiving and Taking Care of Your Disks↲ ↲ ┆84┆You will rapidly accumulate a great number of floppy ↓ ┆19┆┆89┆┄┄disks. These will include:↲ ↲ . XENIX distribution disks↲ ↲ . application packages↲ ↲ . user file systems↲ ↲ . backups↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆84┆Each full, or "periodic", backup of the XENIX system may ↓ ┆19┆┆89┆┄┄require a large number of floppy disks (e.g. seven or ↓ ┆19┆┆89┆┄┄eight double-sided disks to back up a XENIX system with ↓ ┆19┆┆89┆┄┄an 8-megabyte hard disk). You must have enough disks on ↓ ┆19┆┆89┆┄┄hand to keep the backup disks in reserve for several ↓ ┆19┆┆89┆┄┄weeks, as well as sufficient spares on hand for your ↓ ┆19┆┆89┆┄┄users. In addition, you should develop a simple but ↓ ┆19┆┆89┆┄┄logical method for organizing, labeling, and storing ↓ ┆19┆┆89┆┄┄your disks. Since your floppy disks will contain ↓ ┆19┆┆89┆┄┄valuable, and in some cases, irreplaceable data, a high ↓ ┆19┆┆89┆┄┄priority should be given to safety and security. You ↓ ┆19┆┆89┆┄┄should consider designating an off-site storage area in ↓ ┆19┆┆89┆┄┄which to keep alternate backups, to enable recovery from ↓ ┆19┆┆89┆┄┄a disater which damages your computer area.↲ ↲ ┆84┆You should develop a consistent policy for saving your ↓ ┆19┆┆89┆┄┄backups; resist the temptation to immediately reuse the ↓ ┆19┆┆89┆┄┄backup disks. Anticipate that users will occasionally ↓ ┆19┆┆89┆┄┄ask for the restoration of relatively old files. One ↓ ┆19┆┆89┆┄┄approach is to save the full or "periodic" backup disks ↓ ┆19┆┆89┆┄┄for an indefinite period after they are made, and the ↓ ┆19┆┆89┆┄┄incremental backups for at least two weeks. You can ↓ ┆19┆┆89┆┄┄easily rotate these disks back into use for new backups.↲ ↲ ↲ ┆b0┆┆a1┆6.6.3 ┆a8┆┆e8┆Using the tar Command↲ ↲ ┆84┆The tar program is one convenient way to copy a small ↓ ┆19┆┆89┆┄┄number of files or directories to floppy disks. Although ↓ ┆19┆┆89┆┄┄it is a more complicated command, you may wish to use ↓ ┆19┆┆89┆┄┄tar, because it allows you to copy files to floppy disks ↓ ┆19┆┆89┆┄┄without shutting down the system. To use tar, make sure ↓ ┆19┆┆89┆┄┄you are logged in as root, insert a formatted floppy ↓ ┆19┆┆89┆┄┄disk in the drive, and type the command in the following ↓ ┆19┆┆89┆┄┄form:↲ ↲ tar cvf /dev/fd file1 file2 file3↲ ↲ ┆84┆Note that you must follow tar and the switches cvf with ↓ ┆19┆┆89┆┄┄the name of the device to which you want the files ↓ ┆19┆┆89┆┄┄copied. In the above example, ┆a1┆file1┆e1┆, ┆a1┆file2┆e1┆, and ┆a1┆file3┆e1┆ ↓ ┆19┆┆89┆┄┄are being copied to floppy drive 0. Note that you need ↓ ┆19┆┆89┆┄┄not use either mkfs or the mount command to copy to this ↓ ┆19┆┆89┆┄┄disk. If you are copying directories, the whole ↓ ┆19┆┆89┆┄┄directory tree starting from the directory or ↓ ┆19┆┆89┆┄┄directories you name will be copied. To get your copies ↓ ┆19┆┆89┆┄┄back onto the hard disk, position yourself in the ↓ ┆19┆┆89┆┄┄directory into which you need to copy the files or ↓ ┆19┆┆89┆┄┄directories and type:↲ ↲ tar xvf /dev/fd↲ ↲ ┆84┆Consult the XENIX System Reference manual for more ↓ ┆19┆┆89┆┄┄information about using the tar command.↲ ↲ ↲ ┆8c┆┆83┆┆c0┆↓ ┆b0┆┆a1┆6.6.4 Dump/Restore File System↲ ↲ ┆84┆Use of the dump(1) and restor(1) commands will enable ↓ ┆19┆┆89┆┄┄you to perform a more differentiated backup (incremental ↓ ┆19┆┆89┆┄┄dump). For further information, see the ┆a1┆XENIX ↓ ┆19┆┆89┆┄┆84┆Programmer's Manual┆e1┆, Vol. 1.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.7 Common System Problems↲ ↲ ┆84┆If you follow the instructions in this chapter ↓ ┆19┆┆89┆┄┄carefully, you will have few problems with your XENIX ↓ ┆19┆┆89┆┄┄system. However, some difficulties are inevitable with ↓ ┆19┆┆89┆┄┄any computer system. Included here is a discussion of ↓ ┆19┆┆89┆┄┄how to deal with some common system problems.↲ ↲ ↲ ┆b0┆┆a1┆6.7.1 Jammed Lineprinter↲ ↲ ┆84┆You will need super-user powers to carry out these ↓ ┆19┆┆89┆┄┄instructions, so first be sure you are logged in as ↓ ┆19┆┆89┆┄┄"root". Now, do the following in this order:↲ ↲ 1. ┆84┆Check to see which process "owns" the line printer ↓ ┆19┆┆8c┆┄┄and determine its process ID number, using the ps -a ↓ ┆19┆┆8c┆┄┄command:↲ ↲ ps -a↲ ↲ 2. ┆84┆Use the kill command, with the -9 switch to remove ↓ ┆19┆┆8c┆┄┄the process.↲ ↲ kill -9 process ID number ↲ ↲ 3. ┆84┆Remove the file /┆a1┆usr/spool/lpd/lock┆e1┆ and queue another ↓ ┆19┆┆8c┆┄┄print job:↲ ↲ cd /usr/spool/lpd↲ rm -f lock↲ ↲ 4. ┆84┆Resubmit the print job:↲ ↲ pr file lpr&↲ ↲ ↲ ┆b0┆┆a1┆6.7.2 Forgotten Password↲ ↲ ┆84┆For security reasons, there is no way to determine an ↓ ┆19┆┆89┆┄┄existing password. If a user forgets his password, the ↓ ┆19┆┆89┆┄┄system manager - or someone who has the authority to log ↓ ┆19┆┆89┆┄┄in as super-user - must create a new password, using the ↓ ┆19┆┆89┆┄┄passwd command, followed by the name of the user ↓ ┆19┆┆89┆┄┄account:↲ ↲ passwd joeb↲ New Passwd:↲ Reenter passwd:↲ ↲ This will give a user called "joeb" a new password.↲ ↲ ↲ ┆b0┆┆a1┆6.7.3 System is Out of Space↲ ↲ ┆84┆This requires some work. If, after using the df command, ↓ ┆19┆┆89┆┄┄you see that there is very little space on the file ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄system, or the system gives you an "out of space" ↓ ┆19┆┆89┆┄┄message, you will have to use the find and quot ↓ ┆19┆┆89┆┄┄commands and some good judgment to find and delete ↓ ┆19┆┆89┆┄┄little-used files. (These procedures are described in ↓ ┆19┆┆89┆┄┄detail in Section 6.5, "Keeping Your System Healthy".)↲ ↲ ┆84┆If you are chronically short of space, remind users ↓ ┆19┆┆89┆┄┄regularly to clean up their files, using the message of ↓ ┆19┆┆89┆┄┄the day file, /┆a1┆etc/motd┆e1┆.╞ ↲ ↲ ┆84┆It is generally a good idea to maintain 15% free space ↓ ┆19┆┆89┆┄┄on your file system, if possible.↲ ↲ ↲ ┆b0┆┆a1┆6┆a1┆.7.4 System Files Damaged↲ ↲ ┆84┆It is possible to remove or damage important XENIX ↓ ┆19┆┆89┆┄┄system files while logged in as root. To recover these ↓ ┆19┆┆89┆┄┄files, you must be in "single-user" mode. To do this, ↓ ┆19┆┆89┆┄┄bring the system down with the shutdown command, then ↓ ┆19┆┆89┆┄┄reboot the system. Now, when you see the message:↲ ↲ ┆84┆Type control-d to proceed with normal startup↲ ┆84┆(or give root password for system maintenance):↲ ↲ ┆84┆respond with the root password, followed by <ENTER>. ↓ ┆19┆┆89┆┄┄Follow the normal procedure for restoring files ↓ ┆19┆┆89┆┄┄described in Section 6.6. In this case, you will be ↓ ┆19┆┆89┆┄┄restoring your files to the root directory, /. For ↓ ┆19┆┆89┆┄┄example, if /┆a1┆etc/passwd┆e1┆ is lost or damage, it can be ↓ ┆19┆┆89┆┄┄recovered by using the following:↲ ↲ restor xf /dev/rfd0 /etc/passwd↲ ↲ ┆84┆In this example, the /etc/passwd file is restored from ↓ ┆19┆┆89┆┄┄the disk in floppy disk drive 0. If damage to your ↓ ┆19┆┆89┆┄┄system files is very extensive, it is a good idea to ↓ ┆19┆┆89┆┄┄reinstall your XENIX system again, using your XENIX ↓ ┆19┆┆89┆┄┄distribution package and Section 4.1 of this manual. ↓ ┆19┆┆89┆┄┄Then restore all your working files and programs from ↓ ┆19┆┆89┆┄┄your most recent backup floppy disks.↲ ↲ ↲ ┆b0┆┆a1┆6.7.5 Terminal Difficulties↲ ↲ ┆84┆Occasionally, you may experience difficulties with your ↓ ┆19┆┆89┆┄┄terminal. For example, if you use the <BREAK> key to ↓ ┆19┆┆89┆┄┄exit from a screen-oriented program, like the XENIX ↓ ┆19┆┆89┆┄┄text editor vi, there is a possibility that you may ↓ ┆19┆┆89┆┄┄leave the terminal in a "no echo" or "raw" mode. This is ↓ ┆19┆┆89┆┄┄very confusing because you will be unable to see any ↓ ┆19┆┆89┆┄┄output at your terminal. Try the following to reset the ↓ ┆19┆┆89┆┄┄terminal:↲ ↲ <CONTROL-J>↲ stty echo -raw <CONTROL-J>↲ ↲ ┆8c┆┆83┆┆c8┆↓ ┆84┆Note that the first time you type <CONTROL-J>, you will ↓ ┆19┆┆89┆┄┄probably get an error message. The system is responding ↓ ┆19┆┆89┆┄┄first to the invisible message you attempted to type on ↓ ┆19┆┆89┆┄┄the screen. Just try it a second time. The stty command ↓ ┆19┆┆89┆┄┄is terminated with a <CONTROL-J>, not an <ENTER>. If you ↓ ┆19┆┆89┆┄┄are in "no echo" mode, of course, you will not see the ↓ ┆19┆┆89┆┄┄command as you type it.↲ ↲ ↲ ┆b0┆┆a1┆6.7.6 Forgetting the Root Password↲ ↲ ┆84┆DON'T! There is no way to recover from the loss of the ↓ ┆19┆┆89┆┄┄root password, except to reinstall your XENIX system ↓ ┆19┆┆89┆┄┄from the XENIX distribution floppies, using the ↓ ┆19┆┆89┆┄┄procedures described in Section 4.1, then using your ↓ ┆19┆┆89┆┄┄backup floppy disks to restore your system.↲ ↲ ↲ ┆b0┆┆a1┆6.7.7 Removing a Directory↲ ↲ ┆84┆Sometimes when you try to use the rmdir command to ↓ ┆19┆┆89┆┄┄remove a directory, you will get a message saying that ↓ ┆19┆┆89┆┄┄the directory is not empty, even though the lc command ↓ ┆19┆┆89┆┄┄does not list any files. Remember that there may be one ↓ ┆19┆┆89┆┄┄or more files beginning with "." (.┆a1┆profile┆e1┆, for example) ↓ ┆19┆┆89┆┄┄which do not show up in lc output. There are also two ↓ ┆19┆┆89┆┄┄files in every directory called "." and ".." (This ↓ ┆19┆┆89┆┄┄naming convention is explained in Section 6.2). The ↓ ┆19┆┆89┆┄┄command rm* will NOT delete these; the asterisk (*) ↓ ┆19┆┆89┆┄┄will not pick up these files. Use↲ ↲ lc -a↲ ↲ to see these files and then↲ ↲ rm .*↲ ↲ to remove them.↲ ↲ ↲ ┆b0┆┆a1┆6.7.8 Special Characters in Filenames↲ ↲ ┆84┆You should never use any of the following special ↓ ┆19┆┆89┆┄┄characters in the name of a file or directory, because ↓ ┆19┆┆89┆┄┄they have special meanings to XENIX (see the discussion ↓ ┆19┆┆89┆┄┄of naming conventions in Section 6.2):↲ ↲ < > . / ? ' " ; ( ) * & $↲ ↲ ┆84┆If you accidentally type any of the above special ↓ ┆19┆┆89┆┄┄characters into a filename they can be very difficult to ↓ ┆19┆┆89┆┄┄remove. Files with special characters in their names can ↓ ┆19┆┆89┆┄┄be extremely difficult to remove. The worst case is ↓ ┆19┆┆89┆┄┄beginning a file name with a dash (-). The rm command ↓ ┆19┆┆89┆┄┄thinks the "-" is a flag and reports an error. If rm ↓ ┆19┆┆89┆┄┄won't work, try renaming the file with the mv command, ↓ ┆19┆┆89┆┄┄as in the following case where a file is named -┆a1┆┆a1┆x┆e1┆:↲ ↲ mv -x junk↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆84┆Then remove it. As a last resort, move everything else to ↓ ┆19┆┆89┆┄┄another directory, and do↲ ↲ rm -rf dir↲ ↲ ┆84┆on the old directory. Then use mv to rename the ↓ ┆19┆┆89┆┄┄temporary directory to the old name. Do not try to ↓ ┆19┆┆89┆┄┄delete oddly named files with wild card characters like ↓ ┆19┆┆89┆┄┄asterisk (*) and question mark (?) unless you have ↓ ┆19┆┆89┆┄┄thought it out carefully. You can easily end up deleting ↓ ┆19┆┆89┆┄┄everything in your directory.↲ ↲ ↲ ┆b0┆┆a1┆6.7.9 Runaway Processes↲ ↲ ┆84┆You may occasionally find yourself cursed by "runaway ↓ ┆19┆┆89┆┄┄processes" - processes that you cannot stop, or unwanted ↓ ┆19┆┆89┆┄┄output comming to your terminal. Try the following, in ↓ ┆19┆┆89┆┄┄this order of preference:↲ ↲ 1. ┆84┆Wait until the process finishes. This is by far the ↓ ┆19┆┆8c┆┄┄safest course of action, unless the process is ↓ ┆19┆┆8c┆┄┄causing harm.↲ ↲ 2. Try pressing <BREAK>.↲ ↲ 3. ┆84┆A process may prevent you from accessing the terminal ↓ ┆19┆┆8c┆┄┄(e.g. it may either be running in the foreground and ↓ ┆19┆┆8c┆┄┄not accepting input, or running in the background and ↓ ┆19┆┆8c┆┄┄producing lots of output to the screen). In this ↓ ┆19┆┆8c┆┄┄case, go to another terminal (if you have one) and ↓ ┆19┆┆8c┆┄┄run↲ ↲ ps -a↲ ↲ ┆84┆This variant of the ps command tells you about all the ↓ ┆19┆┆8c┆┄┄processes running on the system, so that you can ↓ ┆19┆┆8c┆┄┄determine the process ID (PID column) of the unwanted ↓ ┆19┆┆8c┆┄┄process on the first terminal. Then, logged in as ↓ ┆19┆┆8c┆┄┄root, try the following:↲ ↲ kill -2 PID↲ kill -3 PID↲ ↲ If neither of these work, try↲ ↲ kill -9 PID↲ ↲ ┆84┆This last variant is sure to work, but may leave ↓ ┆19┆┆8c┆┄┄temporary files in the system, or leave the terminal ↓ ┆19┆┆8c┆┄┄in an unknown state. Between each kill command, wait ↓ ┆19┆┆8c┆┄┄a few seconds to see if the process terminates, ↓ ┆19┆┆8c┆┄┄before trying the next one.↲ ↲ ┆8c┆┆83┆┆b0┆↓ 4. ┆84┆In the event that a program prevents you from using ↓ ┆19┆┆8c┆┄┄the system, and you don't have another terminal from ↓ ┆19┆┆8c┆┄┄which to issue the kill command, you may have to ↓ ┆19┆┆8c┆┄┄resort to using the <RESET> switch. This should only ↓ ┆19┆┆8c┆┄┄be done if ABSOLUTELY necessary. Listen for the sound ↓ ┆19┆┆8c┆┄┄of activity on your hard disk. If you must reset the ↓ ┆19┆┆8c┆┄┄system, wait a couple of minutes until the system is ↓ ┆19┆┆8c┆┄┄not accessing the disk, so that the system will be as ↓ ┆19┆┆8c┆┄┄consistent as possible when shut down in this ↓ ┆19┆┆8c┆┄┄abnormal state.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.A XENIX Files and Directories↲ ↲ ┆84┆As system manager, you will be encountering certain ↓ ┆19┆┆89┆┄┄XENIX directories often. For now, it is sufficient to ↓ ┆19┆┆89┆┄┄know their names and general contents. However, as you ↓ ┆19┆┆89┆┄┄gain more experience, you may become curious about XENIX ↓ ┆19┆┆89┆┄┄or decide that you want to make some changes. If you are ↓ ┆19┆┆89┆┄┄considering changing, moving, or deleting any XENIX ↓ ┆19┆┆89┆┄┄system files or directories, it is absolutely essential ↓ ┆19┆┆89┆┄┄that you read the following information very carefully. ↓ ┆19┆┆89┆┄┄There are, of course, several cases in which you might ↓ ┆19┆┆89┆┄┄decide to make these modifications, but you must proceed ↓ ┆19┆┆89┆┄┄very cautiously:↲ ↲ . ┆84┆You may need to move commands between XENIX ↓ ┆19┆┆8b┆┄┄distribution disks 2 and 3, if you are operating a ↓ ┆19┆┆8b┆┄┄floppy-only system.↲ ↲ . ┆84┆You may wish to remove unused commands or other files ↓ ┆19┆┆8b┆┄┄from a crowded disk, to make room for your own ↓ ┆19┆┆8b┆┄┄applications.↲ ↲ . ┆84┆You may need to edit files to adapt the system to your ↓ ┆19┆┆8b┆┄┄own special software or hardware requirements. An ↓ ┆19┆┆8b┆┄┄example of this might be adding an entry in the ↓ ┆19┆┆8b┆┄┄/┆a1┆etc/termcap┆e1┆ file, if you are using an unusual, ↓ ┆19┆┆8b┆┄┄previously unsupported terminal. See Appendix 6.B, ↓ ┆19┆┆8b┆┄┄"The Multi-user System".↲ ↲ ┆84┆Naturally, you should not attempt any modifications ↓ ┆19┆┆89┆┄┄unless you have done a full backup of your system. You ↓ ┆19┆┆89┆┄┄will also quickly discover that many of these files and ↓ ┆19┆┆89┆┄┄directories are owned by root, and you will need to be ↓ ┆19┆┆89┆┄┄logged in as super-user to access them. This protects ↓ ┆19┆┆89┆┄┄the system from accidental damage. Also, note the list ↓ ┆19┆┆89┆┄┄of files in the first section below. You should not ↓ ┆19┆┆89┆┄┄touch these under ANY circumstances. The loss of these ↓ ┆19┆┆89┆┄┄files is irrecoverable; you may not even be able to boot ↓ ┆19┆┆89┆┄┄your system again. If any essential files are lost, you ↓ ┆19┆┆89┆┄┄will need to recreate your XENIX system from the ↓ ┆19┆┆89┆┄┄distribution disks, repeating the installation procedure ↓ ┆19┆┆89┆┄┄described in Section 4.1 of this manual. Then you will ↓ ┆19┆┆89┆┄┄have to boot the system again and restore all your files ↓ ┆19┆┆89┆┄┄from the most recent backup.↲ ↲ ↲ ┆b0┆┆a1┆6.A.1 Do Not Touch↲ ↲ ┆84┆You may have some, or all, of the following files on your ↓ ┆19┆┆89┆┄┄system. Do not remove them:↲ ↲ /┆a1┆fdboot↲ ↲ /┆a1┆xenix↲ ↲ /┆a1┆hdboot↲ ↲ ┆8c┆┆83┆┆c8┆↓ /┆a1┆z80ctl↲ ↲ /┆a1┆diskutil↲ ↲ ↲ ┆b0┆┆a1┆6.A.2 /bin↲ ↲ ┆84┆The /┆a1┆bin┆e1┆ directory contains all executable XENIX ↓ ┆19┆┆89┆┄┄commands. The following should not be removed from the ↓ ┆19┆┆89┆┄┄directory:↲ ↲ basename echo passwd su↲ cp expr rm sync↲ date fsck sh tar↲ dump login sleep restor↲ dumpdir mv stty↲ ↲ ┆84┆One final note: do not remove a file with the peculiar ↓ ┆19┆┆89┆┄┄name " " from the /┆a1┆bin┆e1┆ directory; it is required for the ↓ ┆19┆┆89┆┄┄operation of system shell scripts.↲ ↲ ↲ ┆b0┆┆a1┆6.A.3 /dev↲ ↲ ┆84┆This directory contains special device files which ↓ ┆19┆┆89┆┄┄control access to peripheral devices. You should not ↓ ┆19┆┆89┆┄┄delete or change any of them, since they are used by ↓ ┆19┆┆89┆┄┄essential XENIX commands.↲ ↲ /┆a1┆dev/console┆e1┆ system console↲ /┆a1┆dev/fd0┆e1┆ floppy drive 0↲ /┆a1┆dev/fd1┆e1┆ floppy drive 1↲ /┆a1┆dev/hd0┆e1┆ hard disk 0↲ /┆a1┆dev/lp┆e1┆ lineprinter↲ /┆a1┆dev/mem┆e1┆ physical memory↲ /┆a1┆dev/null┆e1┆ ┆84┆null device (used to redirect unwanted ↓ ┆19┆┆97┆┄┄output)╞ ↲ ↲ /┆a1┆dev/rXX┆e1┆ ┆84┆unbuffered interface to corresponding ↓ ┆19┆┆97┆┄┄device name↲ ↲ /┆a1┆dev/root┆e1┆ root file structure↲ /┆a1┆dev/swap┆e1┆ swap area↲ /┆a1┆dev/ttyXX┆e1┆ terminals↲ /┆a1┆dev/tty┆e1┆ ┆84┆the terminal you are using (the system ↓ ┆19┆┆97┆┄┄will supply the number)↲ ↲ ┆84┆Please note that you should never rename any of these ↓ ┆19┆┆89┆┄┄files. The system relies on some of these names. ↓ ┆19┆┆89┆┄┄However, you can use the ln command to link a name ↓ ┆19┆┆89┆┄┄variant. For example, use the command:↲ ↲ ln /dev/fd0 /dev/floppy0↲ ↲ ┆84┆If you do accidentally destroy a special device file, ↓ ┆19┆┆89┆┄┄you will have to restore it from a backup done with the ↓ ┆19┆┆89┆┄┄sysadmin program. The tar command will not handle ↓ ┆19┆┆89┆┄┄special device files.↲ ↲ ↲ ┆8c┆┆83┆┆e0┆↓ ┆b0┆┆a1┆6.A.4 /etc↲ ↲ ┆84┆The /┆a1┆etc┆e1┆ directory contains miscellaneous system data ↓ ┆19┆┆89┆┄┄files, as well as administrative and other system ↓ ┆19┆┆89┆┄┄programs. Some of these are:↲ ↲ /┆a1┆etc/mtab┆e1┆ mounted device table↲ /┆a1┆etc/passwd┆e1┆ password file↲ /┆a1┆etc/mount┆e1┆ for mounting a file structure↲ /┆a1┆etc/mkfs┆e1┆ for creating a file structure↲ /┆a1┆etc/init┆a1┆┆e1┆ first process after boot↲ /┆a1┆etc/rc┆e1┆ bootup shell script↲ ↲ ┆84┆You should not touch any files in the /┆a1┆etc┆e1┆ directory, ↓ ┆19┆┆89┆┄┄except /┆a1┆etc/ttys┆e1┆ to add or subtract terminals from your ↓ ┆19┆┆89┆┄┄system, and /┆a1┆etc/termcap┆e1┆ to add terminal types. You will ↓ ┆19┆┆89┆┄┄also want to edit /┆a1┆etc/motd┆e1┆, the file containing the ↓ ┆19┆┆89┆┄┄message of the day, which is sent to all users when they ↓ ┆19┆┆89┆┄┄log in.↲ ↲ ↲ ┆b0┆┆a1┆6.A.5 /lib↲ ↲ ┆84┆It is not a good idea to delete anything from this ↓ ┆19┆┆89┆┄┄directory, although it contains mostly libraries for the ↓ ┆19┆┆89┆┄┄C compiler. If you are not using the C compiler you will ↓ ┆19┆┆89┆┄┄not need them.↲ ↲ ↲ ┆b0┆┆a1┆6.A.6 /mnt↲ ↲ ┆84┆This is an empty directory for mounting other file ↓ ┆19┆┆89┆┄┄systems.↲ ↲ ↲ ┆b0┆┆a1┆6.A.7 /tmp↲ ↲ ┆84┆This directory contains temporary files, many of which ↓ ┆19┆┆89┆┄┄can be deleted if you are short of disk space. ↓ ┆19┆┆89┆┄┄Naturally, you should check these individually before ↓ ┆19┆┆89┆┄┄removing them while processes are still running. You can ↓ ┆19┆┆89┆┄┄also put a command in /┆a1┆etc/rc┆e1┆ to do this automatically ↓ ┆19┆┆89┆┄┄at the time of each boot:↲ ↲ rm -fr /tmp↲ mkdir /tmp↲ chmod 777 /tmp↲ ↲ ↲ ┆b0┆┆a1┆6.A.8 /usr↲ ↲ ┆84┆In addition to all the users' home directories, the ┆a1┆usr┆e1┆ ↓ ┆19┆┆89┆┄┄directory contains the following:↲ ↲ /┆a1┆usr/bin┆e1┆ ┆84┆Contains more commands, generally ↓ ┆19┆┆9d┆┄┄those less frequently used or non-↓ ┆19┆┆9d┆┄┄essential to XENIX system operation.↲ ↲ ┆8c┆┆83┆┆d0┆↓ /┆a1┆usr/include┆e1┆ ┆84┆Contains header files for compiling ↓ ┆19┆┆9d┆┄┄C programs. Can be deleted if you ↓ ┆19┆┆9d┆┄┄are not using the C compiler.↲ ↲ /┆a1┆usr/lib┆e1┆ ┆84┆Contains more libraries and data ↓ ┆19┆┆9d┆┄┄files used by various commands; ↓ ┆19┆┆9d┆┄┄should not be deleted.↲ ↲ /┆a1┆usr/spool┆e1┆ ┆84┆Contains various spoolers which ↓ ┆19┆┆9d┆┄┄store files in directories (e.g. ↓ ┆19┆┆9d┆┄┄/┆a1┆usr/spool/lpd┆e1┆).↲ ↲ /┆a1┆usr/tmp┆e1┆ ┆84┆Contains more temporary files which ↓ ┆19┆┆9d┆┄┄might be deleted.↲ ↲ /┆a1┆usr/adm/messages┆e1┆ ┆84┆Contains a record of all the console ↓ ┆19┆┆9d┆┄┄error messages. Typically, these are ↓ ┆19┆┆9d┆┄┄reports of disk errors, along with ↓ ┆19┆┆9d┆┄┄some record of user errors, such as ↓ ┆19┆┆9d┆┄┄"out of disk space" messages. The ↓ ┆19┆┆9d┆┄┄messages are useful for determining ↓ ┆19┆┆9d┆┄┄whether you have a hardware problem; ↓ ┆19┆┆9d┆┄┄you can scan a week's worth of ↓ ┆19┆┆9d┆┄┄messages and see, for example, if ↓ ┆19┆┆9d┆┄┄one particular drive is generating ↓ ┆19┆┆9d┆┄┄an unusual number of errors. You ↓ ┆19┆┆9d┆┄┄will not see every disk error as it ↓ ┆19┆┆9d┆┄┄appears on the console screen. This ↓ ┆19┆┆9d┆┄┄file is likely to grow quickly, so ↓ ┆19┆┆9d┆┄┄periodically check it, print it out, ↓ ┆19┆┆9d┆┄┄and delete the file. Save the ↓ ┆19┆┆9d┆┄┄printout as a record of your ↓ ┆19┆┆9d┆┄┄problems.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.B The Multi-User System↲ ↲ ┆84┆If you have a XENIX system with a hard disk and several ↓ ┆19┆┆89┆┄┄terminals, you will be able to use a number of XENIX ↓ ┆19┆┆89┆┄┄commands intended for systems with several simultaneous ↓ ┆19┆┆89┆┄┄users. These include commands which allow you to ↓ ┆19┆┆89┆┄┄determine which other users are presently on the system, ↓ ┆19┆┆89┆┄┄such as who. You will also be able to communicate with ↓ ┆19┆┆89┆┄┄other users on the system with wall, which broadcasts ↓ ┆19┆┆89┆┄┄any message you type after the prompt, as well as with ↓ ┆19┆┆89┆┄┄the mail program, if it is available on your system. Of ↓ ┆19┆┆89┆┄┄course, even if you are alone on the system, it is often ↓ ┆19┆┆89┆┄┄convenient to mail information to other users; they will ↓ ┆19┆┆89┆┄┄receive it when they log in. You may even use mail to ↓ ┆19┆┆89┆┄┄send helpful reminders to yourself.↲ ↲ ┆84┆However, there are several special cautions that apply ↓ ┆19┆┆89┆┄┄to multi-user system environments. These are described ↓ ┆19┆┆89┆┄┄here.↲ ↲ ↲ ┆b0┆┆a1┆6.B.1 Shutting Down the System↲ ↲ ┆84┆As you have been warned in Section 4.1 of this manual, ↓ ┆19┆┆89┆┄┄it is extremely important to log out and shut the system ↓ ┆19┆┆89┆┄┄down correctly. You should be especially cautious if you ↓ ┆19┆┆89┆┄┄have several users on your system, so that you do not ↓ ┆19┆┆89┆┄┄accidentally terminate any processes they may have ↓ ┆19┆┆89┆┄┄running. Because there may be several users working on ↓ ┆19┆┆89┆┄┄XENIX simultaneously, the system is set up so that only ↓ ┆19┆┆89┆┄┄a user with super-user powers may shut the system down. ↓ ┆19┆┆89┆┄┄So, you will have to log out of your ordinary user ↓ ┆19┆┆89┆┄┄account by typing <CONTROL-D> once again, and log back ↓ ┆19┆┆89┆┄┄in as "root". When you see the prompt, type:↲ ↲ shutdown<ENTER>↲ ↲ You will be asked:↲ ↲ ┆a1┆┆a1┆┆05┆↲ ↲ ┆06┆Minutes till shutdown? (0-15):↲ ↲ ┆a1┆┆05┆↲ ↲ ┆84┆Be sure you give the other users adequate warning to ↓ ┆19┆┆89┆┄┄finish what they are doing and log off the system. You ↓ ┆19┆┆89┆┄┄will even have the opportunity to broadcast a message, ↓ ┆19┆┆89┆┄┄perhaps saying how long the system will be down.↲ ↲ ┆84┆Once you have entered the time until shutdown, you will ↓ ┆19┆┆89┆┄┄see something like:↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆05┆↲ ↲ ┆06┆Xenix Shutdown in 0 minutes.↲ Clean up and log off.↲ All logged off now.↲ Broadcast Message...↲ ↲ Xenix will now terminate.↲ Kill -15 25 21 23↲ **NORMAL SYSTEM SHUTDOWN**↲ ↲ ┆a1┆┆05┆↲ ↲ ┆84┆Do not turn off the computer until you see a "Normal ↓ ┆19┆┆89┆┄┄System Shutdown" message.↲ ↲ ┆84┆You can also use the haltsys command, but you will have ↓ ┆19┆┆89┆┄┄to be careful that all your users are off the system. ↓ ┆19┆┆89┆┄┄Use the who command to find out if anyone else is logged ↓ ┆19┆┆89┆┄┄in. Even if no one is actually still logged in, ↓ ┆19┆┆89┆┄┄processes may still be running on the system. The output ↓ ┆19┆┆89┆┄┄of the command↲ ↲ ps -a↲ ↲ ┆84┆should be checked carefully to determine whether this is ↓ ┆19┆┆89┆┄┄the case. Users can be alerted that you are about to ↓ ┆19┆┆89┆┄┄bring down the system with the wall command.↲ ↲ ↲ ┆b0┆┆a1┆6.B.2 Setting Up Multiple Terminals↲ ↲ ┆84┆In order to use your system, you must tell XENIX what ↓ ┆19┆┆89┆┄┄type of terminal you are using. The characteristics of ↓ ┆19┆┆89┆┄┄all commonly used terminals are stored in a system file ↓ ┆19┆┆89┆┄┄called /┆a1┆etc/termcap┆e1┆, which is called by the user's ↓ ┆19┆┆89┆┄┄.┆a1┆profile┆e1┆ file at login time. If you look at any user's ↓ ┆19┆┆89┆┄┄.┆a1┆profile┆e1┆ you will see an entry like:↲ ↲ TERM=trs16; export TERM↲ TERMCAP=/etc/termcap; export TERMCAP↲ ↲ ┆84┆In this example the "TERM" variable is set to ┆a1┆trs16┆e1┆, or ↓ ┆19┆┆89┆┄┄in other words, tells the system to look in the ↓ ┆19┆┆89┆┄┄/┆a1┆etc/termcap┆e1┆ file for the ┆a1┆trs16┆e1┆ entry. In this example ↓ ┆19┆┆89┆┄┄"trs16" is an abbreviated name of the terminal model ↓ ┆19┆┆89┆┄┄which you are using. The entry contains information ↓ ┆19┆┆89┆┄┄about the special characteristics of the keyboard.↲ ↲ ┆84┆Of course, if you have several different types of ↓ ┆19┆┆89┆┄┄terminals attached to your system, or facilities for ↓ ┆19┆┆89┆┄┄dialing up from other locations, users may be logging in ↓ ┆19┆┆89┆┄┄from different terminals at different times. As system ↓ ┆19┆┆89┆┄┄manager, you must make your users aware that if they log ↓ ┆19┆┆89┆┄┄in from a terminal other than the one specified in their ↓ ┆19┆┆89┆┄┄.┆a1┆profile┆e1┆ file, they will have to reset the terminal type ↓ ┆19┆┆89┆┄┄by typing a command after they log in, or they may be ↓ ════════════════════════════════════════════════════════════════════════ ↓ ┆19┆┆89┆┄┄unable to use the system. If you log in from a terminal ↓ ┆19┆┆89┆┄┄other than the one specified in your .┆a1┆profile┆e1┆ file, ↓ ┆19┆┆89┆┄┄reset the terminal type by typing the abbreviated name ↓ ┆19┆┆89┆┄┄of the terminal you are using after you log in. For ↓ ┆19┆┆89┆┄┄example:↲ ↲ TERM=vt100↲ export TERM↲ ↲ ┆84┆Naturally, the users will have to know which terminal ↓ ┆19┆┆89┆┄┄type they are using and the way in which that terminal ↓ ┆19┆┆89┆┄┄name is abbreviated in the /┆a1┆etc/termcap┆e1┆ file. This ↓ ┆19┆┆89┆┄┄information can be found in the ┆a1┆┆e1┆XENIX System Reference ↓ ┆19┆┆89┆┄┄manual┆e1┆. It is a good idea to print a copy of the ↓ ┆19┆┆89┆┄┄/┆a1┆etc/termcap┆e1┆ file on your system to determine which ↓ ┆19┆┆89┆┄┄terminals are supported.↲ ↲ ↲ ┆b0┆┆a1┆6.B.3 Setting User ID For Multiple Systems↲ ↲ ┆84┆If you are working in an environment with several XENIX ↓ ┆19┆┆89┆┄┄systems, and users wish to work on more than one ↓ ┆19┆┆89┆┄┄computer, moving their files back and forth on floppy ↓ ┆19┆┆89┆┄┄disks, they will need to have valid logins and "home" ↓ ┆19┆┆89┆┄┄directories on each system. Please note, however, that ↓ ┆19┆┆89┆┄┄the user must be assigned the same user ID number on ↓ ┆19┆┆89┆┄┄each system if he wishes to transfer file systems ↓ ┆19┆┆89┆┄┄between computers. If you customarily add user accounts ↓ ┆19┆┆89┆┄┄with the mkuser program, be aware that the assignment of ↓ ┆19┆┆89┆┄┄a user ID number is done automatically and arbitrarily.↲ ↲ ┆84┆Therefore, you must edit the /┆a1┆etc/passwd┆e1┆ file to supply ↓ ┆19┆┆89┆┄┄identical user ID numbers for each of your systems. The ↓ ┆19┆┆89┆┄┄password file entry will look something like this:↲ ↲ johnd:j9djf:204:50:Accounting 333:/usr/johnd:/bin/sh:↲ ↲ ┆84┆The user ID number is the one immediately following the ↓ ┆19┆┆89┆┄┄encrypted password. You may use any number over 200, as ↓ ┆19┆┆89┆┄┄long as it does not belong to another user. Check to ↓ ┆19┆┆89┆┄┄make sure the entries are identical for all the XENIX ↓ ┆19┆┆89┆┄┄systems you are working with.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆6.C GLOSSARY↲ ↲ ┆84┆Here is a list of word that occur in this chapter and in ↓ ┆19┆┆89┆┄┄other XENIX documentation. It includes the definition of ↓ ┆19┆┆89┆┄┄some commonly used computer terms and concepts, as well ↓ ┆19┆┆89┆┄┄as some terms specific to the XENIX System, with an ↓ ┆19┆┆89┆┄┄emphasis on terms related to system operation and ↓ ┆19┆┆89┆┄┄maintenance.↲ ↲ ┆b0┆┆a1┆Access┆e1┆↲ ↲ ┆84┆Your ability to look at, change, and use files and ↓ ┆19┆┆89┆┄┄directories. To have access, you must first have a valid ↓ ┆19┆┆89┆┄┄acccount on your XENIX system, as well as individual ↓ ┆19┆┆89┆┄┄and/or group permission for the files you wish to work ↓ ┆19┆┆89┆┄┄with.↲ ↲ ┆b0┆┆a1┆Account↲ ↲ ┆84┆An account is your authorization to use the system. ↓ ┆19┆┆89┆┄┄XENIX maintains a list of all valid user logins - that ↓ ┆19┆┆89┆┄┄is, user names, passwords, and optional group ↓ ┆19┆┆89┆┄┄identification.↲ ↲ ┆b0┆┆a1┆Accounting↲ ↲ ┆84┆A XENIX facility for tracking system usage. XENIX keeps ↓ ┆19┆┆89┆┄┄a record of processes run on the system and how much the ↓ ┆19┆┆89┆┄┄system is used by a given user.↲ ↲ ┆b0┆┆a1┆Application↲ ↲ ┆84┆Application programs perform specific user tasks, such ↓ ┆19┆┆89┆┄┄as word processing, accounting, inventory, or business ↓ ┆19┆┆89┆┄┄forecasting. These programs may be purchased with your ↓ ┆19┆┆89┆┄┄system or in separate packages, or written by system ↓ ┆19┆┆89┆┄┄users.↲ ↲ ┆b0┆┆a1┆Archive↲ ↲ ┆84┆Archiving is the process of copying files and ↓ ┆19┆┆89┆┄┄directories to floppy disks, and removing the files from ↓ ┆19┆┆89┆┄┄the system. Archiving should be done for programs and ↓ ┆19┆┆89┆┄┄files which are little used in order to save space on ↓ ┆19┆┆89┆┄┄your hard disk.↲ ↲ ┆b0┆┆a1┆Argument↲ ↲ ┆84┆XENIX commands are often followed by an argument, most ↓ ┆19┆┆89┆┄┄commonly the name of a file to which the command will be ↓ ┆19┆┆89┆┄┄applied.↲ ↲ ┆b0┆┆a1┆Background↲ ↲ ┆84┆XENIX is a multitasking system, which can run more than ↓ ┆19┆┆89┆┄┄one process, or program, at once. Commands may be run in ↓ ┆19┆┆89┆┄┄the background by putting the ampersand character (&) at ↓ ┆8c┆┆83┆┆c8┆↓ ┆19┆┆89┆┄┄the end of the command line. Background processes leave ↓ ┆19┆┆89┆┄┄the terminal free, and other processes may be started ↓ ┆19┆┆89┆┄┄without waiting for a background process to finish.↲ ↲ ┆b0┆┆a1┆Backup↲ ↲ ┆84┆The process of making a copy of all the data on your ↓ ┆19┆┆89┆┄┄system in case the original is destroyed or damaged.↲ ↲ ┆b0┆┆a1┆Basic System↲ ↲ ┆84┆Your XENIX basic system contains system programs, ↓ ┆19┆┆89┆┄┄utilities, and frequntly used commands. It does not ↓ ┆19┆┆89┆┄┄include specialized software development or text ↓ ┆19┆┆89┆┄┄processing packages, or any other application software.↲ ↲ ┆b0┆┆a1┆Boot↲ ↲ ┆84┆This a frequently used computer term to describe the ↓ ┆19┆┆89┆┄┄sequence of programs which start up your system. It is ↓ ┆19┆┆89┆┄┄distinguished from physically turning on, or powering ↓ ┆19┆┆89┆┄┄up, the computer, or the installation of XENIX software ↓ ┆19┆┆89┆┄┄on your system for the first time.↲ ↲ ┆b0┆┆a1┆CPU↲ ↲ The central processing unit of your computer.↲ ↲ ┆b0┆┆a1┆Child Process↲ ↲ ┆84┆Refers to a process which is created by another, or ↓ ┆19┆┆89┆┄┄parent, process.↲ ↲ ┆b0┆┆a1┆Command↲ ↲ ┆84┆This is your request to the system to perform a given ↓ ┆19┆┆89┆┄┄task. Commands may be system programs or shell ↓ ┆19┆┆89┆┄┄procedures.↲ ↲ ┆b0┆┆a1┆Configuration↲ ↲ ┆84┆This term refers to the particular collection of devices ↓ ┆19┆┆89┆┄┄you have on your system, and the way these are ↓ ┆19┆┆89┆┄┄connected, such as a "floppy-only" or "8-megabyte hard ↓ ┆19┆┆89┆┄┄disk" configuration.↲ ↲ ┆b0┆┆a1┆Console↲ ↲ ┆84┆This is the controlling terminal for the XENIX system, ↓ ┆19┆┆89┆┄┄from which the system is first booted, and to which ↓ ┆19┆┆89┆┄┄error messages about serious system conditions are sent.↲ ↲ ┆b0┆┆a1┆Cursor↲ ↲ ┆84┆The cursor, typically represented by a lighted square on ↓ ┆19┆┆89┆┄┄your terminal screen, indicates where the next character ↓ ┆19┆┆89┆┄┄you type will appear.↲ ↲ ┆8c┆┆83┆┆d0┆↓ ┆b0┆┆a1┆Core File↲ ↲ ╞ ┆84┆A file which is sometimes produced when a program ↓ ┆19┆┆89┆┄┄terminates unexpectedly due to some fault, such as an ↓ ┆19┆┆89┆┄┄illegal instruction or data access, or when a user ↓ ┆19┆┆89┆┄┄accidentally types a quit at the keyboard. This file ↓ ┆19┆┆89┆┄┄will automatically be stored in your current working ↓ ┆19┆┆89┆┄┄directory, and should be deleted to save disk space.↲ ↲ ┆b0┆┆a1┆Device Driver↲ ↲ ┆84┆A set of routines which enable the XENIX system to ↓ ┆19┆┆89┆┄┄control and pass data to and from an input/output ↓ ┆19┆┆89┆┄┄device, such as a lineprinter or disk drive.↲ ↲ ┆b0┆┆a1┆Device Special File↲ ↲ ┆84┆This is a XENIX file which provides direct access to a ↓ ┆19┆┆89┆┄┄physical device. Writing to a device special file causes ↓ ┆19┆┆89┆┄┄the data to be sent directly to the device. These files ↓ ┆19┆┆89┆┄┄are in the /┆a1┆dev┆e1┆ directory.↲ ↲ ┆b0┆┆a1┆Directory↲ ↲ ┆84┆A directory is a file containing the names of a ↓ ┆19┆┆89┆┄┄collectuion of files. The XENIX system offers the ↓ ┆19┆┆89┆┄┄capacity to organize information hierarhically by ↓ ┆19┆┆89┆┄┄allowing you to group related files into directories.↲ ↲ ┆b0┆┆a1┆Disk Drive↲ ↲ ┆84┆A device that stores information in magnetic form on the ↓ ┆19┆┆89┆┄┄surface of a either a hard or floppy disk, and which can ↓ ┆19┆┆89┆┄┄access data from any point on the disk.↲ ↲ ┆b0┆┆a1┆File System↲ ↲ ┆84┆A collection of files associated with a physical disk ↓ ┆19┆┆89┆┄┄drive, which is attached to, or mounted on, the root ↓ ┆19┆┆89┆┄┄directory.↲ ↲ ┆b0┆┆a1┆File Structure↲ ↲ ┆84┆A hierarchically organized collection of files and ↓ ┆19┆┆89┆┄┄directories.↲ ↲ ┆b0┆┆a1┆File↲ ↲ ┆84┆The basic unit of storage on your system. All data, ↓ ┆19┆┆89┆┄┄programs, and text are stored in files.↲ ↲ ┆b0┆┆a1┆Format↲ ↲ ┆84┆Both hard and floppy disks must be prepared to accept ↓ ┆19┆┆89┆┄┄XENIX data with the formatting program called diskutil.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆84┆┆b0┆┆a1┆Group↲ ↲ ┆84┆A number of users may be designated as having identical ↓ ┆19┆┆89┆┄┄access rights to certain files, and are listed in a file ↓ ┆19┆┆89┆┄┄called /┆a1┆etc/group┆e1┆.↲ ↲ ┆b0┆┆a1┆Group ID↲ ↲ ┆b0┆┆f0┆┆84┆Each user on the system is assigned to a group, ↓ ┆19┆┆89┆┆81┆┄identified by a number taken from the password file when ↓ ┆19┆┆89┆┆81┆┄the user logs in. Each process started by the user ↓ ┆19┆┆89┆┆81┆┄inherits that group ID.↲ ↲ ┆84┆┆b0┆┆a1┆Home Directory↲ ↲ ┆84┆The directory where you are automatically postioned when ↓ ┆19┆┆89┆┄┄you log in. The home directory is set up by the login ↓ ┆19┆┆89┆┄┄process from the information in the password file. The ↓ ┆19┆┆89┆┄┄shell maintains a shell variable "$HOME" which is set ↓ ┆19┆┆89┆┄┄to the home directory.↲ ↲ ┆b0┆┆a1┆Kernel↲ ↲ ┆84┆The term "XENIX kernel" is usually used to refer to the ↓ ┆19┆┆89┆┄┄code in the file /xenix. This is the program loaded at ↓ ┆19┆┆89┆┄┄boot time, and contains routines to implement all the ↓ ┆19┆┆89┆┄┄system calls, task scheduling, and interrupt handling. ↓ ┆19┆┆89┆┄┄It also contains the programs which control ↓ ┆19┆┆89┆┄┄communication to the input/output devices.↲ ↲ ┆b0┆┆a1┆Login↲ ↲ ┆84┆This is the process of typing your name and password ↓ ┆19┆┆89┆┄┄into the computer in order to begin work.↲ ↲ ┆b0┆┆a1┆Mount↲ ↲ ┆84┆The process of attaching a file structure to the file ↓ ┆19┆┆89┆┄┄system.↲ ↲ ╞ ┆a1┆┆b0┆Multi-user↲ ↲ ╞ ┆84┆When most XENIX systems are booted they come up in ↓ ┆19┆┆89┆┄┄"single-user" mode, with just the "super-user" logged in ↓ ┆19┆┆89┆┄┄on the system console. When the "super-user" logs out, ↓ ┆19┆┆89┆┄┄the system goes "multi-user", and users can log in on ↓ ┆19┆┆89┆┄┄other terminals.↲ ↲ ┆b0┆┆a1┆Multi-tasking↲ ↲ ┆84┆The capacity to run two or more tasks, or programs, ↓ ┆19┆┆89┆┄┄simultaneously.↲ ↲ ┆b0┆┆a1┆Permission↲ ↲ ┆84┆Access to files and directories on your XENIX system may ↓ ┆19┆┆89┆┄┄be limited by assigning read, write, execute, and search ↓ ┆19┆┆89┆┄┄permissions.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆Parent↲ ↲ ┆84┆This term has two meanings in the XENIX system. A parent ↓ ┆19┆┆89┆┄┄process is one which sets another, child process going. ↓ ┆19┆┆89┆┄┄A parent directory is the directory immediately above ↓ ┆19┆┆89┆┄┄the current one in the directory tree.↲ ↲ ┆b0┆┆a1┆Operating System↲ ↲ ┆84┆This is the collection of programs which control the ↓ ┆19┆┆89┆┄┄user's interaction with the system and determine how the ↓ ┆19┆┆89┆┄┄total resources of the computer are allocated to ↓ ┆19┆┆89┆┄┄individual users and programs. An operating system also ↓ ┆19┆┆89┆┄┄controls communication with input/output devices such as ↓ ┆19┆┆89┆┄┄terminals and lineprinters. The XENIX system is an ↓ ┆19┆┆89┆┄┄operating system.↲ ↲ ┆b0┆┆a1┆Output↲ ↲ ┆84┆The result of processing by the computer, generally ↓ ┆19┆┆89┆┄┄communicated to the user via terminal or lineprinter.↲ ↲ ┆b0┆┆a1┆Password↲ ↲ ┆84┆A user's account is optionally protected by a password, ↓ ┆19┆┆89┆┄┄which the user must type when requested along with his ↓ ┆19┆┆89┆┄┄account name, in order to gain access to the system.↲ ↲ ┆b0┆┆a1┆Pathname↲ ↲ ┆84┆This is the name of a file or directory, expressed as ↓ ┆19┆┆89┆┄┄the path down which you must travel from the root ↓ ┆19┆┆89┆┄┄directory in order to reach it.↲ ↲ ┆b0┆┆a1┆Pipe↲ ↲ ╞ ┆84┆This is a mechanism symbolized bythe pipe character↲ ╞ ┆84┆( ), which allows the user to connect two processes ↓ ┆19┆┆89┆┄┄together.↲ ↲ ┆b0┆┆a1┆Prompt↲ ↲ ┆84┆The prompt is the signal that the system is ready to ↓ ┆19┆┆89┆┄┄accept the user's input. The two XENIX prompts are the ↓ ┆19┆┆89┆┄┄number sign ( ), if you are logged in as super-user, or ↓ ┆19┆┆89┆┄┄dollar sign ($), the ordinary system prompt.↲ ↲ ┆b0┆┆a1┆Root Directory↲ ↲ ┆84┆The directory at the top of the XENIX file structure, ↓ ┆19┆┆89┆┄┄called "/", which contains XENIX system-level files and ↓ ┆19┆┆89┆┄┄directories.↲ ↲ ┆b0┆┆a1┆Root┆e1┆↲ ↲ ┆84┆A synonym for the "super-user". Also the name for the ↓ ┆19┆┆89┆┄┄directory at the top of the directory tree, refered to ↓ ┆19┆┆89┆┄┄as slash (/). ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆b0┆┆a1┆Scroll↲ ↲ ┆84┆The way in which text moves up and down on your terminal ↓ ┆19┆┆89┆┄┄screen.↲ ↲ ┆b0┆┆a1┆Shell↲ ↲ ┆84┆The XENIX command line interpreter which accepts ↓ ┆19┆┆89┆┄┄commands from the user and passes them to the system for ↓ ┆19┆┆89┆┄┄execution.↲ ↲ ┆b0┆┆a1┆Single User↲ ↲ ┆84┆A XENIX system configurered for only one user. You may ↓ ┆19┆┆89┆┄┄also see this term used to describe the mode in which ↓ ┆19┆┆89┆┄┄the system first comes up, when the user is logged in as ↓ ┆19┆┆89┆┄┄"super-user" at the system console. In this mode the ↓ ┆19┆┆89┆┄┄date can be set and file system cleaning performed.↲ ↲ ┆b0┆┆a1┆Stand-Alone↲ ↲ ┆84┆Refers to programs which run independently of XENIX. ↓ ┆19┆┆89┆┄┄Examples are: diskutil, hdinit, and firsttime.↲ ↲ ┆b0┆┆a1┆Super-User↲ ↲ ┆84┆Also known as root. Because the super-user has ↓ ┆19┆┆89┆┄┄unrestricted access to the file system, this user ID ↓ ┆19┆┆89┆┄┄should be used very cautiously.↲ ↲ ┆b0┆┆a1┆Swapping↲ ↲ ┆84┆If there are more active processes in the system than ↓ ┆19┆┆89┆┄┄there is space for in memory, the system moves them back ↓ ┆19┆┆89┆┄┄and forth to the disk while they are not actually ↓ ┆19┆┆89┆┄┄running.↲ ↲ ┆b0┆┆a1┆System Management↲ ↲ ┆84┆Those functions performed by a user appointed as system ↓ ┆19┆┆89┆┄┄manager, or administrator, including the establishment ↓ ┆19┆┆89┆┄┄of user accounts, disk maintenance, and backups.↲ ↲ ┆b0┆┆a1┆Tar File↲ ↲ ┆84┆A file produced by the so-called tape archive program, ↓ ┆19┆┆89┆┄┄tar. This is usually written directly to floppy disk or ↓ ┆19┆┆89┆┄┄magnetic tape.↲ ↲ ┆b0┆┆a1┆User ID↲ ↲ ┆84┆Each user on the system is identified by a number which ↓ ┆19┆┆89┆┄┄is recorded in the password file. All files and ↓ ┆19┆┆89┆┄┄directories in the file system belong to a user ID, and ↓ ┆19┆┆89┆┄┄that user may specify whether and how other users on the ↓ ┆19┆┆89┆┄┄system may access each file and directory.↲ ↲ ┆b0┆┆a1┆Working Directory↲ ↲ Your current position in the file structure hierarchy.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ↲ ↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆┆05┆7-┆0b┆↲ ↲ ┆a1┆┆b0┆7.╞ ╞ NORMAL USE↲ ↲ ╞ ╞ ┆84┆This chapter describes the XENIX system startup and shutdown ↓ ┆19┆┆89┆┄┄procedures.↲ ↲ ↲ ┆a1┆┆b0┆7.1╞ ╞ System Startup Procedure↲ ↲ ╞ ╞ 1. ┆84┆Check that there is no diskette in the RC3951 diskette ↓ ┆19┆┆8c┆┄┄drive.↲ ↲ ╞ ╞ 2. ┆84┆Apply power to terminals connected to the RC3922 (in ↓ ┆19┆┆8c┆┄┄particu┄lar the terminal connected to J1, where system ↓ ┆19┆┆8c┆┄┄messages will appear).↲ ↲ ╞ ╞ 3. Apply power to the RC3922/1 and RC3951.↲ ↲ ╞ ╞ 4. Observe the RC3922/1 status lamps.↲ ↲ ╞ ╞ ┆84┆The RC3922 has six status lamps, labeled from left to right:↲ ╞ ╞ ┆84┆TEST, DISK, CIRCUIT XMIT, CIRCUIT RCV, LAN XMIT, and LAN RCV. ↓ ┆19┆┆89┆┄┄In the RC3922/1, the two LAN lamps are not connected, and will ↓ ┆19┆┆89┆┄┄never light. In a normal RC3922/1 startup sequence, the status ↓ ┆19┆┆89┆┄┄lamps will light as follows:↲ ↲ ╞ ╞ ╞ ┆a1┆Lamps Lit┆e1┆╞ ╞ ╞ ┆a1┆┆e1┆ ┆a1┆Duration┆e1┆ ┆a1┆┆e1┆ ┆a1┆Phase↲ ↲ ╞ ╞ 1 : all four╞ ╞ ╞ ╞ ╞ RC3922 power switched on↲ ╞ ╞ 2 : TEST╞ ╞ ╞ approx. 10 sec. RC3922 selftest↲ ╞ ╞ 3 : DISK╞ ╞ ╞ ╞ xx sec. ┆84┆program load from Win┄↓ ┆19┆┆af┆┄┄ches┄ter disk↲ ╞ ╞ 4 : DISK CIRCUIT XMIT/RCV ╞ program running↲ ╞ (5) : TEST DISK╞ ╞ ╞ ╞ program load failure↲ ↲ ╞ ╞ ┆84┆When XENIX is running, the DISK lamp indicates a disk transfer. ↓ ┆19┆┆89┆┄┄The CIRCUIT XMIT/RCV lamps indicate that the terminal control┄↓ ┆19┆┆89┆┄┄ler (ITC) is receiving/answering commands. If the TEST and DISK ↓ ┆19┆┆89┆┄┄lamps are lit at the same time, consult Chapter 9 of this manu-↓ ┆19┆┆89┆┄┄al.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆84┆In the selftest phase, approximately 12 lines of test results ↓ ┆19┆┆89┆┄┄are output on the terminal connected to RC3922/1 plug J1. De-↓ ┆19┆┆89┆┄┄pending on the terminal (e.g. RC855 or RC822) this output may ↓ ┆19┆┆89┆┄┄appear on the screen as nonsense on account of parity checking.↲ ↲ ╞ ╞ ┆84┆When XENIX is ready, a message will appear on the system termi-↓ ┆19┆┆89┆┄┄nal (plug J1) requesting the root password or <ctrl>d. If you ↓ ┆19┆┆89┆┄┄respond with the root password, XENIX will enter system main-↓ ┆19┆┆89┆┄┄tenance mode; if you respond with <ctrl>d, the system will go ↓ ┆19┆┆89┆┄┄multiuser. If you do not respond within 15 seconds, the system ↓ ┆19┆┆89┆┄┄will proceed as if you had typed <ctrl>d.↲ ↲ ↲ ┆a1┆┆b0┆7.2╞ ╞ XENIX System Running↲ ↲ ╞ ╞ ┆84┆When the system is booted and running multiuser, as described ↓ ┆19┆┆89┆┄┄in the previous section, you will be able to log in. The first ↓ ┆19┆┆89┆┄┄user to log in will be asked for the date and time of day.↲ ↲ ↲ ┆a1┆┆b0┆7.3╞ ╞ XENIX System Shutdown↲ ↲ ╞ ╞ ┆84┆You should always shut the system down before turning the power ↓ ┆19┆┆89┆┄┄off; if you do not, XENIX will indicate possible errors in the ↓ ┆19┆┆89┆┄┄file system the next time you boot. To shut the system down, ↓ ┆19┆┆89┆┄┄you must be logged in as root (super-user) and use the command:↲ ↲ ╞ ╞ ╞ /etc/shutdown↲ ↲ ╞ ╞ After some other message, the message↲ ↲ ╞ ╞ ╞ ** normal system shutdown **↲ ↲ ╞ ╞ will appear, and you may turn the power off.↲ ↲ ╞ ╞ ┆84┆You should always shut the system down at the end of working ↓ ┆19┆┆89┆┄┄hours in order to prolong the lifetime of the Winchester disk ↓ ┆19┆┆89┆┄┄drive.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆╞ ╞ ╞ ┆05┆8-┆0b┆↲ ↲ ┆a1┆┆b0┆8.╞ ╞ RC3900 MENU SYSTEM↲ ↲ ╞ ╞ ┆84┆This chapter briefly describes the RC3900 menu system insofar ↓ ┆19┆┆89┆┄┄as it differs from the menu system described in the Uniplex ↓ ┆19┆┆89┆┄┄manual. As shown in the diagram on the next page, the RC3900 ↓ ┆19┆┆89┆┄┄menu system is like a tree; the main menu is the trunk, and the ↓ ┆19┆┆89┆┄┄following are branches:↲ ↲ ╞ ╞ - word processing system menu↲ ╞ ╞ - utilities menu↲ ╞ ╞ - company directory menu↲ ╞ ╞ - electronic mail menu↲ ╞ ╞ - telex service menu↲ ╞ ╞ - room management system menu↲ ╞ ╞ - appointment management system menu↲ ╞ ╞ - file transfer service menu↲ ↲ ╞ ╞ ┆84┆Each of these menus in turn contains branches. The first four ↓ ┆19┆┆89┆┄┄menus are included in the standard RC3900 menu system, and are ↓ ┆19┆┆89┆┄┄described in the present chapter. The last four menus represent ↓ ┆19┆┆89┆┄┄nonstandard facilities, which must be purchased and installed ↓ ┆19┆┆89┆┄┄separately, and are described in other publications.↲ ↲ ╞ ╞ ┆84┆The RC3900 menu system builds on the XENIX operating system. In ↓ ┆19┆┆89┆┄┄the following sections, the underlying XENIX command is indi┄↓ ┆19┆┆89┆┄┄cat┄ed for most of the options described. These commands may be ↓ ┆19┆┆89┆┄┄studied in the XENIX Programmer's Guide. The terminal user can ↓ ┆19┆┆89┆┄┄also request a display of the portion of the XENIX Programmer's ↓ ┆19┆┆89┆┄┄Guide that describes a particular command. This is done on the ↓ ┆19┆┆89┆┄┄menu level by entering the command:↲ <ctrl>x man XENIX-command-name↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆84┆When displayed on the terminal, the menus and instructions in ↓ ┆19┆┆89┆┄┄the RC3900 menu system are largely self-explanatory, and for ↓ ┆19┆┆89┆┄┄this reason the following sections describe mostly things which ↓ ┆19┆┆89┆┄┄may not be readily apparent. Simple examples are given where ↓ ┆19┆┆89┆┄┄examples are relevant. In these examples, whatever is entered ↓ ┆19┆┆89┆┄┄by the terminal user is shown underlined, e.g. ┆a1┆20*9/5+32┆e1┆; the ↓ ┆19┆┆89┆┄┄pressing of the "Return" key at the end of a line is not ↓ ┆19┆┆89┆┄┄shown. The reader will find a basic key description in the ↓ ┆19┆┆89┆┄┄Uniplex manual, which provides a fuller explanation of many ↓ ┆19┆┆89┆┄┄things which are treated summarily in this chapter.↲ ↲ ↲ ╞ ╞ ┆a1┆MAIN MENU↲ ╞ ╞ ┆a1┆ Word Processing System Menu (8.1)↲ ╞ ╞ ┆a1┆ Create a new document (8.1.1)↲ ╞ ╞ ┆a1┆ Edit a document (8.1.2)↲ ╞ ╞ ┆a1┆ Print a document (8.1.3)↲ ╞ ╞ ┆a1┆ Mail merge (8.1.4)↲ ╞ ╞ ┆a1┆ Change directory (8.1.5)↲ ╞ ╞ ┆a1┆ List files (8.1.6)↲ ╞ ╞ ┆a1┆ Index System Menu (8.1.7)↲ ╞ ╞ ┆a1┆ Names in this directory only (8.1.7.1)↲ ╞ ╞ ╞ ┆a1┆ Names in this and subdirectories (8.1.7.2)↲ ╞ ╞ ╞ ┆a1┆ Names in a specified directory (8.1.7.3)↲ ╞ ╞ ╞ ┆a1┆ Names on a particular subject (8.1.7.4)↲ ╞ ╞ ╞ ┆a1┆ Find the location of a file (8.1.7.5)↲ ╞ ╞ ╞ ┆a1┆ Classify the contents of a file (8.1.7.6)↲ ╞ ╞ ╞ ┆a1┆ View the start of a file (8.1.7.7)↲ ╞ ╞ ╞ ┆a1┆ View the end of a file (8.1.7.8)↲ ╞ ╞ ┆a1┆ File Checking Menu (8.1.8)↲ ╞ ╞ ┆a1┆ View spelling errors in a file (8.1.8.1)↲ ╞ ╞ ╞ ┆a1┆ Save spelling errors (8.1.8.2)↲ ╞ ╞ ╞ ┆a1┆ View spelling errors saved (8.1.8.3)↲ ╞ ╞ ╞ ┆a1┆ Print out spelling errors saved (8.1.8.4)↲ ╞ ╞ ╞ ┆a1┆ Count lines, words, and characters (8.1.8.5)↲ ╞ ╞ ╞ ┆a1┆ Full file status report (8.1.8.6)↲ ╞ ╞ ╞ ┆a1┆ List files (8.1.8.7)↲ ╞ ╞ ┆a1┆ Utilities Menu (8.1.9)┆e1┆ (continues)↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆a1┆MAIN MENU┆e1┆ (continued)↲ ╞ ╞ ┆a1┆ Utilities Menu (8.2)↲ ╞ ╞ ┆a1┆ Copy (8.2.1)↲ ╞ ╞ ┆a1┆ Erase (8.2.2)↲ ╞ ╞ ┆a1┆ New name (8.2.3)↲ ╞ ╞ ┆a1┆ Open a new directory (8.2.4)↲ ╞ ╞ ┆a1┆ Remove an empty directory (8.2.5)↲ ╞ ╞ ┆a1┆ List files (8.2.6)↲ ╞ ╞ ┆a1┆ Time and date (8.2.7)↲ ╞ ╞ ┆a1┆ Monthly calendar (8.2.8)↲ ╞ ╞ ┆a1┆ Desk calculator (8.2.9)↲ ╞ ╞ ┆a1┆ Company Directory Menu (8.3)↲ ╞ ╞ ┆a1┆ Look up an entry (8.3.1)↲ ╞ ╞ ┆a1┆ Edit the directory (8.3.2)↲ ╞ ╞ ┆a1┆ Print the directory (8.3.3)↲ ╞ ╞ ┆a1┆ Electronic Mail Menu (8.4)↲ ╞ ╞ ┆a1┆ Mailboxes on the system (8.4.1)↲ ╞ ╞ ┆a1┆ Send mail to another user (8.4.2)↲ ╞ ╞ ┆a1┆ Collect mail (8.4.3)↲ ╞ ╞ ┆a1┆ Who is also on the computer (8.4.4)↲ ╞ ╞ ┆a1┆ Talk to another user (8.4.5)↲ ╞ ╞ ┆a1┆ Install extended facilities (8.4.6)↲ ╞ ╞ ┆a1┆ Telex Service Menu (8.5)↲ ╞ ╞ ┆a1┆ Room Management System (8.5)↲ ╞ ╞ ┆a1┆ Appointment Management System Menu (8.5)↲ ╞ ╞ ┆a1┆ File Transfer Service Menu (8.5)↲ ↲ ↲ ┆a1┆┆b0┆8.1╞ ╞ W - Word Processing System Menu↲ ↲ ╞ ╞ ┆84┆Selection of option W on the main menu displays the word ↓ ┆19┆┆89┆┄┄processing system menu, from which the options described in ↓ ┆19┆┆89┆┄┄this section can be selected.↲ ↲ ↲ ┆a1┆┆b0┆8.1.1╞ C - Create a new document↲ ↲ ╞ ╞ ┆84┆Selection of option C on the word processing system menu ↓ ┆19┆┆89┆┄┄displays an instruction to enter a file name. Example:↲ ↲ ╞ ╞ ┆a1┆advent↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆84┆The above command creates a new file named advent in the cur┄↓ ┆19┆┆89┆┄┄rent directory, and then clears the screen, so that the user ↓ ┆19┆┆89┆┄┄can type and edit the file. For further information, see the ↓ ┆19┆┆89┆┄┄Uniplex manual.↲ ↲ ↲ ┆a1┆┆b0┆8.1.2╞ E - Edit a document↲ ↲ ╞ ╞ ┆84┆Selection of option E on the word processing system menu ↓ ┆19┆┆89┆┄┄displays an instruction to enter a file name. Example:↲ ↲ ╞ ╞ ┆a1┆advent↲ ╞ ╞ I just created my first file.↲ ↲ ╞ ╞ ┆84┆The above command displays the contents of the (existing) file ↓ ┆19┆┆89┆┄┄named advent in the current directory, so that the user can ↓ ┆19┆┆89┆┄┄edit the file. For further information, see the Uniplex manual.↲ ↲ ↲ ┆a1┆┆b0┆8.1.3╞ P - Print a document↲ ↲ ╞ ╞ ┆84┆Selection of option P on the word processing system menu ↓ ┆19┆┆89┆┄┄displays an instruction to enter the name of a file to be ↓ ┆19┆┆89┆┄┄printed. Example:↲ ↲ ╞ ╞ ┆a1┆advent↲ ↲ ╞ ╞ ┆84┆The above command displays the print set-up instruction sheet ↓ ┆19┆┆89┆┄┄for the file named advent in the current directory. The print ↓ ┆19┆┆89┆┄┄set-up instruction sheet is self-explanatory.↲ ↲ ↲ ┆a1┆┆b0┆8.1.4╞ M - Mail merge↲ ↲ ╞ ╞ ┆84┆Selection of option M on the word processing system menu ↓ ┆19┆┆89┆┄┄displays an instruction to enter the name of a standard text ↓ ┆19┆┆89┆┄┄file. Example:↲ ↲ ╞ ╞ ┆a1┆advent↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆84┆The above command displays the mail merge instruction sheet for ↓ ┆19┆┆89┆┄┄the file named advent in the current directory. For further ↓ ┆19┆┆89┆┄┄information, see the Uniplex manual.↲ ↲ ↲ ┆a1┆┆b0┆8.1.5╞ D - Change directory↲ ↲ ╞ ╞ ┆84┆Selection of option D on the word processing system menu ↓ ┆19┆┆89┆┄┄displays an instruction to enter a directory name. Example:↲ ↲ ╞ ╞ ┆a1┆Letters↲ ↲ ╞ ╞ ┆84┆The above command changes the current directory to the sub-↓ ┆19┆┆89┆┄┄directory named Letters. XENIX command: cd↲ ↲ ↲ ┆a1┆┆b0┆8.1.6╞ L - List files↲ ↲ ╞ ╞ ┆84┆Selection of option L on the word processing system menu ↓ ┆19┆┆89┆┄┄displays a listing of all file names in the current directory. ↓ ┆19┆┆89┆┄┄XENIX command: ls↲ ↲ ↲ ┆a1┆┆b0┆8.1.7╞ I - Index System Menu↲ ↲ ╞ ╞ ┆84┆Selection of option I on the word processing system menu ↓ ┆19┆┆89┆┄┄displays the index system menu, from which the options ↓ ┆19┆┆89┆┄┄described in this subsection can be selected.↲ ↲ ↲ ┆a1┆┆b0┆8.1.7.1╞ 1 - Names in this directory only↲ ↲ ╞ ╞ ┆84┆Selection of option 1 on the index system menu displays a ↓ ┆19┆┆89┆┄┄listing of the names of all files and subdirectories in the ↓ ┆19┆┆89┆┄┄current directory. XENIX command: ls↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.1.7.2╞ 2 - Names in this and subdirectories↲ ↲ ╞ ╞ ┆84┆Selection of option 2 on the index system menu displays a ↓ ┆19┆┆89┆┄┄listing of the names of all files in the current directory and ↓ ┆19┆┆89┆┄┄in any subdirectory. XENIX command: ls↲ ↲ ↲ ┆a1┆┆b0┆8.1.7.3╞ 3 - Names in a specified directory↲ ↲ ╞ ╞ ┆84┆Selection of option 3 on the index system menu displays an in-↓ ┆19┆┆89┆┄┄struction to specify a directory listing in any of four diffe┄r-↓ ┆19┆┆89┆┄┄ent ways. Example:↲ ↲ ╞ ╞ ┆a1┆-1↲ ↲ ╞ ╞ ┆84┆The above command displays a listing of all file names, with ↓ ┆19┆┆89┆┄┄statistical information, in the current directory. See further ↓ ┆19┆┆89┆┄┄Subsection 8.1.8.6. XENIX command: ls↲ ↲ ↲ ┆a1┆┆b0┆8.1.7.4╞ 4 - Names on a particular subject↲ ↲ ╞ ╞ ┆84┆Selection of option 4 on the index system menu displays an in-↓ ┆19┆┆89┆┄┄struction to enter a subject to be looked for. Example:↲ ↲ ╞ ╞ ┆a1┆time↲ ╞ ╞ ./temp↲ ↲ ╞ ╞ ┆84┆The above command displays the file name temp, as this file ↓ ┆19┆┆89┆┄┄contains the word time. Note that the pathname of the file is ↓ ┆19┆┆89┆┄┄displayed, where "." stands for the current directory (usually ↓ ┆19┆┆89┆┄┄/usr/user-name, which indicates that the file is in the user's ↓ ┆19┆┆89┆┄┄login directory). XENIX command: grep↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.1.7.5╞ 5 - Find the location of a file↲ ↲ ╞ ╞ ┆84┆Selection of option 5 on the index system menu displays an in-↓ ┆19┆┆89┆┄┄struction to enter the name of a file to be found. Example:↲ ↲ ╞ ╞ ┆a1┆sec?↲ ╞ ╞ ./Report/Part1/sec1↲ ╞ ╞ ./Report/Part1/sec2↲ ╞ ╞ ./Report/Part2/sec1↲ ↲ ╞ ╞ ┆84┆The above command displays the pathnames (cf. 8.1.7.4) of the ↓ ┆19┆┆89┆┄┄files named sec?. Note the use of the wildcard character "?" to ↓ ┆19┆┆89┆┄┄indicate any single character in the name. XENIX command: find↲ ↲ ↲ ┆a1┆┆b0┆8.1.7.6╞ 6 - Classify the contents of a file↲ ↲ ╞ ╞ ┆84┆Selection of option 6 on the index system menu displays an in-↓ ┆19┆┆89┆┄┄struction to enter the name of a document to be looked at. ↓ ┆19┆┆89┆┄┄Example:↲ ↲ ╞ ╞ ┆a1┆wp.back.up↲ ╞ ╞ wp.back.up: ascii text↲ ↲ ╞ ╞ ┆84┆The above command displays the classification of the file named ↓ ┆19┆┆89┆┄┄wp.back.up. XENIX command: file↲ ↲ ↲ ┆a1┆┆b0┆8.1.7.7╞ 7 - View the start of a file↲ ↲ ╞ ╞ ┆84┆Selection of option 7 on the index system menu displays an in-↓ ┆19┆┆89┆┄┄struction to enter the name of a document to be looked at. When ↓ ┆19┆┆89┆┄┄the user has done so, the first part of the file is displayed ↓ ┆19┆┆89┆┄┄for identification. XENIX command: head↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.1.7.8╞ 8 - View the end of a file↲ ↲ ╞ ╞ ┆84┆Selection of option 8 on the index system menu displays an in-↓ ┆19┆┆89┆┄┄struction to enter the name of a document to be looked at. When ↓ ┆19┆┆89┆┄┄the user has done so, the last part of the file is displayed ↓ ┆19┆┆89┆┄┄for identification. XENIX command: tail↲ ↲ ↲ ┆a1┆┆b0┆8.1.8╞ F - File Checking Menu↲ ↲ ╞ ╞ ┆84┆Selection of option F on the word processing system menu ↓ ┆19┆┆89┆┄┄displays the file checking menu, from which the options de-↓ ┆19┆┆89┆┄┄scribed in this subsection can be selected.↲ ↲ ↲ ┆a1┆┆b0┆8.1.8.1╞ 1 - View spelling errors in a file↲ ↲ ╞ ╞ ┆84┆Selection of option 1 on the file checking menu displays an in-↓ ┆19┆┆89┆┄┄struction to enter the name of a document to be checked for ↓ ┆19┆┆89┆┄┄spelling. Example:↲ ↲ ╞ ╞ ┆a1┆temp↲ ╞ ╞ citozens↲ ↲ ╞ ╞ ┆84┆The above command displays the misspelled word citozens in the ↓ ┆19┆┆89┆┄┄file named temp. XENIX command: spell↲ ↲ ↲ ┆a1┆┆b0┆8.1.8.2╞ 2 - Save spelling errors↲ ↲ ╞ ╞ ┆84┆Selection of option 2 on the file checking menu displays an in-↓ ┆19┆┆89┆┄┄struction to enter the name of a document to be checked for ↓ ┆19┆┆89┆┄┄spelling. When the user has done so, the file is checked, and ↓ ┆19┆┆89┆┄┄any misspelled word is saved in a special file named badspell. ↓ ┆19┆┆89┆┄┄XENIX command: spell > badspell↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.1.8.3╞ 3 - View spelling errors saved↲ ↲ ╞ ╞ ┆84┆Selection of option 3 on the file checking menu displays the ↓ ┆19┆┆89┆┄┄contents of the file badspell (cf. 8.1.8.2) for editing. ↓ ┆19┆┆89┆┄┄Example:↲ ↲ ╞ ╞ May 11 15:05 1984 Page 1↲ ╞ ╞ citozens↲ ↲ ╞ ╞ XENIX command: more badspell↲ ↲ ↲ ┆a1┆┆b0┆8.1.8.4╞ 4 - Print out spelling errors ↲ ↲ ╞ ╞ ┆84┆Selection of option 4 on the file checking menu prints out the ↓ ┆19┆┆89┆┄┄contents of the file badspell (cf. 8.1.8.3). XENIX command:↲ ╞ ╞ lpr badspell↲ ↲ ↲ ┆a1┆┆b0┆8.1.8.5╞ 5 - Count lines, words, and characters↲ ↲ ╞ ╞ ┆84┆Selection of option 5 on the file checking menu displays an in-↓ ┆19┆┆89┆┄┄struction to enter the name of a document to be looked at. ↓ ┆19┆┆89┆┄┄Example:↲ ↲ ╞ ╞ ┆a1┆┆e1┆ ┆a1┆temp↲ ╞ ╞ 4 16 76 temp↲ ↲ ╞ ╞ ┆84┆The above command displays a count of 4 lines, 16 words, and 76 ↓ ┆19┆┆89┆┄┄characters for the file named temp. XENIX command: wc↲ ↲ ↲ ┆a1┆┆b0┆8.1.8.6╞ 6 - Full file status report↲ ↲ ╞ ╞ ┆84┆Selection of option 6 on the file checking menu displays an in-↓ ┆19┆┆89┆┄┄struction to enter the name of a document to be looked at. ↓ ┆19┆┆89┆┄┄Example:↲ ↲ ╞ ╞ ┆a1┆temp↲ ╞ ╞ -rw-r--r-- 1 joe 76 Apr 6 16:33 temp↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆84┆The above command displays the following statistical informa┄↓ ┆19┆┆89┆┄┄tion for the file named temp:↲ ↲ ╞ ╞ access and execution permissions:╞ -rw-r--r--↲ ╞ ╞ names by which the file is known (links): 1↲ ╞ ╞ user who owns the file:╞ ╞ ╞ joe↲ ╞ ╞ file size in characters (bytes):╞ ╞ 76↲ ╞ ╞ date and time of latest modification: Apr 6 16:33↲ ↲ ╞ ╞ ┆84┆Similar statistical information is displayed by the -1 command ↓ ┆19┆┆89┆┄┄described in Subsection 8.1.7.3. XENIX command: ls -l↲ ↲ ↲ ┆a1┆┆b0┆8.1.8.7╞ L - List files↲ ↲ ╞ ╞ ┆84┆Selection of option L on the file checking menu is equivalent ↓ ┆19┆┆89┆┄┄to selection of option 3 on the index system menu (8.1.7.3).↲ ↲ ↲ ┆a1┆┆b0┆8.1.9╞ U - Utilities Menu↲ ↲ ╞ ╞ ┆84┆Selection of option U on the word processing system menu is ↓ ┆19┆┆89┆┄┄equivalent to selection of option U on the main menu, as ↓ ┆19┆┆89┆┄┄described in Section 8.2.↲ ↲ ↲ ┆a1┆┆b0┆8.2╞ ╞ U - Utilities Menu↲ ↲ ╞ ╞ ┆84┆Selection of option U on the main menu displays the utilities ↓ ┆19┆┆89┆┄┄menu, from which the options described in this section can be ↓ ┆19┆┆89┆┄┄selected.↲ ↲ ↲ ┆a1┆┆b0┆8.2.1╞ C - Copy↲ ↲ ╞ ╞ ┆84┆Selection of option C on the utilities menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter a file name, first for the original file, ↓ ┆19┆┆89┆┄┄and then for the new file. Example:↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆a1┆temp↲ ╞ ╞ original file temp↲ ╞ ╞ ┆a1┆savetemp↲ ╞ ╞ new file savetemp↲ ↲ ╞ ╞ ┆84┆The above commands make a copy of the file named temp and name ↓ ┆19┆┆89┆┄┄the copy savetemp. XENIX command: cp↲ ↲ ↲ ┆a1┆┆b0┆8.2.2╞ E - Erase↲ ↲ ╞ ╞ ┆84┆Selection of option E on the utilities menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter a file name for the original file. ↓ ┆19┆┆89┆┄┄Example:↲ ↲ ╞ ╞ ┆a1┆oldtemp↲ ↲ ╞ ╞ ┆84┆Following user confirmation, the above command removes the file ↓ ┆19┆┆89┆┄┄named oldtemp from the current directory. XENIX command: rm↲ ↲ ↲ ┆a1┆┆b0┆8.2.3╞ N - New name↲ ↲ ╞ ╞ ┆84┆Selection of option N on the utilities menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter a file name, first for the original file, ↓ ┆19┆┆89┆┄┄and then for the new file. Example:↲ ↲ ╞ ╞ ┆a1┆temp↲ ╞ ╞ original file temp↲ ╞ ╞ ┆a1┆example↲ ╞ ╞ new file example↲ ↲ ╞ ╞ ┆84┆The above command changes the file name temp to the file name ↓ ┆19┆┆89┆┄┄example. XENIX command: mv↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.2.4╞ O - Open a new directory↲ ↲ ╞ ╞ ┆84┆Selection of option O on the utilities menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter the name of a subdirectory. Example:↲ ↲ ╞ ╞ ┆a1┆Report↲ ↲ ╞ ╞ ┆84┆The above command creates a new directory named Report in the ↓ ┆19┆┆89┆┄┄current directory. XENIX command: mkdir↲ ↲ ↲ ┆a1┆┆b0┆8.2.5╞ R - Remove an empty directory↲ ↲ ╞ ╞ ┆84┆Selection of option R on the utilities menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter the name of a subdirectory. Example:↲ ↲ ╞ ╞ ┆a1┆Draft↲ ↲ ╞ ╞ ┆84┆The above command removes the subdirectory named Draft, ↓ ┆19┆┆89┆┄┄provided the latter contains no files. XENIX command: rmdir↲ ↲ ↲ ┆a1┆┆b0┆8.2.6╞ L - List files↲ ↲ ╞ ╞ ┆84┆Selection of option L on the utilities menu is equivalent to ↓ ┆19┆┆89┆┄┄selection of option 3 on the index system menu (8.1.7.3) or ↓ ┆19┆┆89┆┄┄option L on the file checking menu (8.1.8.7).↲ ↲ ↲ ┆a1┆┆b0┆8.2.7╞ T - Time and date↲ ↲ ╞ ╞ ┆84┆Selection of option T on the utilities menu displays the ↓ ┆19┆┆89┆┄┄current date and time of day. Example:↲ ↲ ╞ ╞ ┆a1┆┆e1┆Fri May 11 09:06:23 GMT 1984↲ ↲ ╞ ╞ XENIX command: date↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.2.8╞ M - Monthly calendar↲ ↲ ╞ ╞ ┆84┆Selection of option M on the utilities menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter a year or a month and year. Example:↲ ↲ ╞ ╞ ┆a1┆9 1752↲ ╞ ╞ ╞ September 1752↲ ╞ ╞ S M Tu W Th F S↲ ╞ ╞ ╞ 1 2 14 15 16↲ ╞ ╞ 17 18 19 20 21 22 23↲ ╞ ╞ 24 25 26 27 28 29 30↲ ↲ ╞ ╞ XENIX command: cal↲ ↲ ↲ ┆a1┆┆b0┆8.2.9╞ D - Desk calculator↲ ↲ ╞ ╞ ┆84┆Selection of option D on the utilities menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter input to the calculator program. Example:↲ ↲ ╞ ╞ ┆a1┆20*9/5+32↲ ╞ ╞ 68↲ ↲ ╞ ╞ ┆84┆The above command activates the program, which calculates the ↓ ┆19┆┆89┆┄┄answer shown. XENIX command: bc↲ ↲ ↲ ┆a1┆┆b0┆8.3╞ ╞ C - Company Directory Menu↲ ↲ ╞ ╞ ┆84┆Selection of option C on the main menu displays the company ↓ ┆19┆┆89┆┄┄directory menu, from which the options described in this ↓ ┆19┆┆89┆┄┄section can be selected.↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.3.1╞ L - Look up an entry↲ ↲ ╞ ╞ ┆84┆Selection of option L on the company directory menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter a pattern to be looked for. Example:↲ ↲ ╞ ╞ ┆a1┆rc↲ ╞ ╞ RC Ballerup ...↲ ╞ ╞ RC Glostrup ...↲ ╞ ╞ RC Ålborg, Nørresundby ...↲ ╞ ╞ RC Odense, TS ...↲ ╞ ╞ RC Præstø ...↲ ╞ ╞ RC/TS Esbjerg ...↲ ↲ ╞ ╞ ┆84┆The above command displays all entries containing the pattern ↓ ┆19┆┆89┆┄┄rc. The user must press the key combination <ctrl>d in order to ↓ ┆19┆┆89┆┄┄return to the menu.↲ ↲ ↲ ┆a1┆┆b0┆8.3.2╞ E - Edit the directory↲ ↲ ╞ ╞ ┆84┆Selection of option E on the company directory menu displays ↓ ┆19┆┆89┆┄┄the contents of the company directory, so that the user can ↓ ┆19┆┆89┆┄┄edit it (cf. 8.1.2).↲ ↲ ↲ ┆a1┆┆b0┆8.3.3╞ P - Print the directory↲ ↲ ╞ ╞ ┆84┆Selection of option P on the company directory menu displays ↓ ┆19┆┆89┆┄┄the print set-up instruction sheet for the company directory ↓ ┆19┆┆89┆┄┄(cf.8.1.3).↲ ↲ ↲ ┆a1┆┆b0┆8.4╞ ╞ E - Electronic Mail Menu↲ ↲ ╞ ╞ ┆84┆Selection of option E on the main menu displays the electronic ↓ ┆19┆┆89┆┄┄mail menu, from which the options described in this section can ↓ ┆19┆┆89┆┄┄be selected.↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.4.1╞ M - Mailboxes on the system↲ ↲ ╞ ╞ ┆84┆Selection of option M on the electronic mail menu displays a ↓ ┆19┆┆89┆┄┄listing of all mailboxes on the system (cf. 8.4.2). XENIX com┄↓ ┆19┆┆89┆┄┄mand: ls /usr/spool/mail↲ ↲ ↲ ┆a1┆┆b0┆8.4.2╞ S - Send mail to another user↲ ↲ ╞ ╞ ┆84┆Selection of option S on the electronic mail menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter the name of a user to send mail to, i.e. ↓ ┆19┆┆89┆┄┄the name of his mailbox (cf. 8.4.1). Example:↲ ↲ ╞ ╞ ┆a1┆moe↲ ╞ ╞ ┆a1┆Shall I wake you at four every day next week too?↲ ╞ ╞ ┆a1┆<ctrl>d↲ ↲ ╞ ╞ ┆84┆The mailbox name, moe, is followed on the next line by the mes-↓ ┆19┆┆89┆┄┄sage to be sent. The key combination <ctrl>d must be used to ↓ ┆19┆┆89┆┄┄terminate the external function invoked by this option. When ↓ ┆19┆┆89┆┄┄the user to whom mail was sent next logs into the computer, he ↓ ┆19┆┆89┆┄┄will be informed that there is mail in his mailbox. XENIX ↓ ┆19┆┆89┆┄┄command: mail↲ ↲ ↲ ┆a1┆┆b0┆8.4.3╞ C - Collect mail↲ ↲ ╞ ╞ ┆84┆Selection of option C on the electronic mail menu displays the ↓ ┆19┆┆89┆┄┄latest piece of mail (if any) in the user's mailbox. Example:↲ ↲ ╞ ╞ ┆a1┆┆e1┆From moe Fri May 11 16:59:32 1984↲ ╞ ╞ Yes, wake me again next week, if you don't mind.↲ ╞ ╞ ?↲ ↲ ╞ ╞ ┆84┆The message, on the second line, is preceded by a header. The ↓ ┆19┆┆89┆┄┄question mark is a prompt to the user to enter a command indi-↓ ┆19┆┆89┆┄┄cating what should be done with the mail. For a list of the ↓ ┆19┆┆89┆┄┄available commands, the user can enter a question mark. XENIX ↓ ┆19┆┆89┆┄┄command: mail↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.4.4╞ W - Who is also on the computer↲ ↲ ╞ ╞ ┆84┆Selection of option W on the electronic mail menu displays the ↓ ┆19┆┆89┆┄┄user name, terminal name, and time of logging in for every user ↓ ┆19┆┆89┆┄┄currently on the computer (cf. 8.4.5). Example:↲ ↲ ╞ ╞ root tty0 May 9 09:01↲ ╞ ╞ moe tty1 May 9 09:30↲ ╞ ╞ joe tty2 May 9 10:06↲ ↲ ╞ ╞ XENIX command: who↲ ↲ ↲ ┆a1┆┆b0┆8.4.5╞ T - Talk to another user↲ ↲ ╞ ╞ ┆84┆Selection of option T on the electronic mail menu displays an ↓ ┆19┆┆89┆┄┄instruction to enter the name and location of a person to talk ↓ ┆19┆┆89┆┄┄to (cf. 8.4.4). Example of a conversation between two users, ↓ ┆19┆┆89┆┄┄the sequence of which is indicated in parentheses:↲ ↲ ╞ ╞ ┆a1┆┆e1┆user joe terminal display┆e1┆╞ ┆a1┆┆e1┆user moe terminal display↲ ╞ ╞ ┆81┆------------------------- -------------------------┆82┆↲ ╞ ╞ ( 1) ┆a1┆moe tty1┆e1┆╞ ╞ ╞ ( 2) ┆a1┆┆e1┆Message from joe tty2↲ ╞ ╞ ( 3) ┆a1┆I was to wake you.-o-┆e1┆ ( 4) I was to wake you.-o-↲ ╞ ╞ ( 6) Message from moe tty1 ( 5) ┆a1┆joe tty2↲ ╞ ╞ ( 8) Thanks a lot!-oo- ( 7) ┆a1┆Thanks a lot!-oo-↲ ╞ ╞ (10) EOF ( 9) ┆a1┆<ctrl>d↲ ╞ ╞ (11) ┆a1┆<ctrl>d┆e1┆ (12) EOF↲ ↲ ╞ ╞ ┆84┆The use of "-o-" (for "over") and "-oo-" (for "over and out") ↓ ┆19┆┆89┆┄┄is not mandatory, but helpful. The key combination <ctrl>d must ↓ ┆19┆┆89┆┄┄be used to terminate the external function invoked by this ↓ ┆19┆┆89┆┄┄option. ("EOF" is short for "end of file"). XENIX command: ↓ ┆19┆┆89┆┄┄write↲ ↲ ↲ ┆a1┆┆b0┆8.4.6╞ I - Install extended facilities↲ ↲ ╞ ╞ ┆84┆Selection of option I on the electronic mail menu displays an ↓ ┆19┆┆89┆┄┄install new facilities instruction sheet, which tells how to go ↓ ┆19┆┆89┆┄┄about installing extended electronic mail facilities.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆8.5╞ ╞ Nonstandard Facilities↲ ↲ ╞ ╞ ┆84┆An install new facilities instruction sheet is displayed on ↓ ┆19┆┆89┆┄┄selection of any of the following options on the main menu:↲ ↲ ╞ ╞ T - Telex Service↲ ╞ ╞ R - Room Management System↲ ╞ ╞ A - Appointment Management System↲ ╞ ╞ F - File Transfer Service↲ ↲ ↲ ┆a1┆┆b0┆8.6╞ ╞ Function Key Differences↲ ↲ ╞ ╞ ┆84┆The function key combinations used in the RC3900 system differ ↓ ┆19┆┆89┆┄┄from those described in the Uniplex manual as follows:↲ ↲ ╞ ╞ ┆a1┆Uniplex┆e1┆╞ ┆a1┆RC3900┆e1┆╞ ┆a1┆Function↲ ↲ ╞ ╞ <ctrl>x╞ <ctrl>g╞ delete line↲ ╞ ╞ <esc> h╞ <esc> ?╞ quick help↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆┆05┆9-┆0b┆↲ ↲ ┆a1┆┆b0┆9.╞ ╞ ERROR HANDLING↲ ↲ ╞ ╞ ┆84┆The system contains two microprocessors, located respectively ↓ ┆19┆┆89┆┄┄on the system CPU (central processing unit) and ITC (intelli-↓ ┆19┆┆89┆┄┄gent terminal controller) boards. Both boards execute built-in ↓ ┆19┆┆89┆┄┄selftests after power-up, and deliver selftest results to a ↓ ┆19┆┆89┆┄┄connected terminal: the system CPU board to the console inter-↓ ┆19┆┆89┆┄┄face K1 (usually not connected) and the ITC board to J1 (should ↓ ┆19┆┆89┆┄┄always be connected).↲ ↲ ╞ ╞ ┆84┆Each board, moreover, drives two LED (light-emitting diode) ↓ ┆19┆┆89┆┄┄status lamps. TEST and DISK are driven by the system CPU ↓ ┆19┆┆89┆┄┄board, and CIRCUIT XMIT/RCV by the ITC board.↲ ↲ ↲ ┆a1┆┆b0┆9.1╞ ╞ TEST Lamp Flashes or Stays Lit during Power-Up↲ ↲ ╞ ╞ ┆84┆If the lamp labeled TEST starts flashing or is lit continuously ↓ ┆19┆┆89┆┄┄for more than 15 seconds, the built-in selftest may have ┄ ↓ ┆19┆┆89┆┄┄failed. If this happens, connect a terminal to the console ↓ ┆19┆┆89┆┄┄inter┄face K1 and restart the system.↲ ↲ ╞ ╞ ┆84┆When the CPU selftest now sees that a "test console" is present ↓ ┆19┆┆89┆┄┄(DSR active), it will not start to execute until the console ↓ ┆19┆┆89┆┄┄baud rate has been determined. The selftest can determine this ↓ ┆19┆┆89┆┄┄when the console operator types one upper-case U for 9600, ↓ ┆19┆┆89┆┄┄4800, or 2400 bauds or two upper-case U's for 1200, 600, or 300 ↓ ┆19┆┆89┆┄┄bauds. No other baud rates are supported.↲ ↲ ╞ ╞ ┆84┆The "test console" should always be configured as follows: 8 ↓ ┆19┆┆89┆┄┄data bits/character, 2 stop bits/character, and no parity.↲ ↲ ╞ ╞ ┆84┆In the baud rate determination phase, the selftest writes aste┄↓ ┆19┆┆89┆┄┄risks (*) to the console at 9600 bauds, but these may appe┄ar as ↓ ┆19┆┆89┆┄┄garbage or not at all when the attached terminal operates at a ↓ ┆19┆┆89┆┄┄different baud rate.↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ╞ ╞ ┆84┆If an error is detected during the selftest, the program writes ↓ ┆19┆┆89┆┄┄to the console which test failed. Note down the contents of ↓ ┆19┆┆89┆┄┄such a message and report the error to RC Computer.↲ ↲ ╞ ╞ If the selftest terminates successfully, it writes↲ ↲ ╞ ╞ ╞ RC3922 Monitor, iSBC 86/30 version, rel 1.6↲ ╞ ╞ ╞ .↲ ↲ ╞ ╞ ("." is a prompt) to the console.↲ ↲ ╞ ╞ ┆84┆Now type LG <CR> (Load and Go) from the console to boot the ↓ ┆19┆┆89┆┄┄XENIX system. If the boot is unsuccessful, the loader program ↓ ┆19┆┆89┆┄┄lights the TEST and DISK lamps together, and writes↲ ↲ ╞ ╞ ╞ Winchester load timeout↲ ╞ ╞ ╞ .↲ ↲ ╞ ╞ ("." is a prompt) to the console.↲ ↲ ↲ ┆a1┆┆b0┆9.2╞ ╞ Error Message during Power-Up↲ ↲ ╞ ╞ ┆84┆If the system was not shut down properly, it will write an ↓ ┆19┆┆89┆┄┄error message during the next power-up, and ask whether the ↓ ┆19┆┆89┆┄┄file system should be cleaned. Always answer y (yes) to this ↓ ┆19┆┆89┆┄┄question.↲ ↲ ╞ ╞ ┆84┆If the ITC board selftest detects an error during power-up, it ↓ ┆19┆┆89┆┄┄will write a message to the terminal connected to J1. The con-↓ ┆19┆┆89┆┄┄figuration of this terminal will be 9600 bauds, 8 data bits/ ↓ ┆19┆┆89┆┄┄character, 1 stop bit/character, and no parity.↲ ↲ ╞ ╞ ┆84┆If such a message is displayed, note down its contents and ↓ ┆19┆┆89┆┄┄report the error to RC Computer.↲ ↲ ↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆a1┆┆b0┆9.3╞ ╞ Unusual Behavior during Normal Use↲ ↲ ╞ ╞ ┆84┆Unusual behavior during normal use could be caused by a number ↓ ┆19┆┆89┆┄┄of factors. For further information, see Section 6.5 of this ↓ ┆19┆┆89┆┄┄manual.↲ ════════════════════════════════════════════════════════════════════════ ↓ ┆14┆┆b3┆┆05┆A-┆0b┆↲ ↲ ┆a1┆┆b0┆A.╞ ╞ OTHER LITERATURE↲ ↲ ↲ ┆a1┆┆b0┆A.1╞ ╞ Books on the Unix System↲ ↲ Bourne, Steve. ┆a1┆The UNIX System.┆e1┆ Reading, Massachusetts:↲ ╞ ╞ Addison-Wesley, 1983.↲ ╞ ╞ Gauthier, Richard. ┆a1┆Using the UNIX System.┆e1┆ Englewood Cliffs,↲ New Jersey: Prentice-Hall, 1981.↲ ╞ ╞ McGilton, Henry and Morgan, Rachel. ┆a1┆Introducing the UNIX↲ ┆19┆┄┄┆84┆┆e1┆ ┆a1┆┆e1┆ ┆a1┆System.┆e1┆ New York, New York: McGraw-Hill, 1983.↲ ╞ ╞ Thomas, Rebecca and Yates, Jean. ┆a1┆A User Guide to the UNIX ↲ ╞ ╞ ┆a1┆System.┆e1┆ Berkeley, California: Osborne/McGraw-Hill, 1982.↲ ╞ ╞ Waite, Mitchell; Martin, Donald; and Prata, Steve. ┆a1┆Unix Primer↲ ╞ ╞ ┆a1┆Plus.┆e1┆ Indianapolis, Indiana: Howard W. Sams and Co., 1983.↲ ↲ ↲ ┆a1┆┆b0┆A.2╞ ╞ Books on the C Programming Language↲ ↲ ╞ ╞ Feuer, Alan R. ┆a1┆The C Puzzle Book.┆e1┆ Englewood Cliffs, New Jersey:↲ ╞ ╞ Prentice-Hall, 1983.↲ ╞ ╞ Hancock, Les and Krieger, Morris. ┆a1┆The C Primer.┆e1┆ New York, New↲ ╞ ╞ York: McGraw-Hill, 1982.↲ ╞ ╞ Kernighan, Brian W. and Ritchie, Dennis M. ┆a1┆The C Programming↲ ╞ ╞ ┆a1┆Language.┆e1┆ Englewood Cliffs, New Jersey: Prentice-Hall, 1978.↲ ╞ ╞ Plum, Thomas. ┆a1┆C Programming Standards and Guidelines.┆e1┆ Cardiff,↲ ╞ ╞ New Jersey: Plum Hall, 1982.↲ ╞ ╞ Plum, Thomas. ┆a1┆Learning to Program in C.┆e1┆ Cardiff, New Jersey:↲ ╞ ╞ Plum Hall, 1983.↲ ╞ ╞ Zahn, C.T. ┆a1┆C Notes.┆e1┆ New York, New York: Yourdon Press, 1979.↲ ↲ ┆1a┆┆1a┆New York: Yordon Press,