
IT/PS/164 Version 3.0 September, 2002 CERN UNIX User Guide Editor: Alan Silverman ACKNOWLEDGEMENTS Much of the information in this Guide is not original; we are indebted to the authors of the "UNIX at Fermilab Guide" and the authors of the "GSI UNIX Primer" for permitting us to include information lifted from those two excellent publications. We also thank other CERN colleagues for helping us with particular sections and with the numerous edits which were necessary to correct our initial drafts. Information in this Guide is not copyright but any use in other documents should include not only acknowledgement to this source but also to the FNAL and GSI guides as well. This Guide is by no means guaranteed free from error, especially considering the range of UNIX architectures and environments it is intended to cover. Readers are encouraged to send comments and error reports to Alan Silver- man at the e-mail address [email protected]. Copies of this Guide can be found as follows: AFS File /afs/cern.ch/asis/share/usr.local/doc/unixguide.ps Anonymous ftp file asisftp.cern.ch:pub/doc/unixguide.ps WWW - postscript The full postscript file can be found under the Documents Section of the UNIX Workstation Support Page, URL - http://wsspinfo.cern.ch/file/doc- uments WWW - html The HTML version is also available at the URL http://wsspinfo.cern.ch/ file/documents and has options for selecting by contents pages or Index entries. You will also find symbols defined to show footnotes and forward and backward ref- erences. CHANGE RECORD Version 1.00 1 July 1994 First general release: prepared by Harry Renshall, Judy Richards and Alan Silverman; edited by Tracey Appleby Version 1.01 11 July 1994 HTML address of Guide added Version 1.02 14 July 1994 UCO Book List and purchase scheme updated. AFS address of Guide modified Version 1.10 14 November 1994 Various minor mods including more options on the ftp, lpq and lprmcommands and information on symbolic links Version 1.11 27 March 1995 Some corrections made for documentation sources for elm, pine and gnu Additions to index Additions to the list of special chars in Appendix A Several minor errors and typing errors corrected Clearer explanation of Internet addressing Newer book recommendation for gnu emacs Version 2.0 1 February1996 Translated to FrameMaker by Luc Goidadin Version 2.1 8 March 1996 Reference to local disc copy of guide removed Version 2.2 1 August 1996 Mostly small error corrections and minor additions (thanks to Dietrich Wiegandt for pointing them out) Removal of sections on elm and connecting to CERNVM Note about CN recommendations for mail agent (pine) and newsreaders (trn and xrn) Version 3.0 28 September 2002 Made conformant to IT-recommended architecture Examples taken from zsh and tcsh (mainly) Table of contents 1. Introduction ........................................................................... 7 1.1 The Standard CERN Unix Environment .........................................................7 1.1.1 Certified UNIX Architecture ..........................................................................................7 1.1.2 SUE - The Standard UNIX Environment ...........................................................................8 1.1.3 The HEPiX User Environment ...........................................................................................8 1.2 Getting a UNIX Account ...............................................................................8 1.3 Login, Logout, Setting Passwords ...................................................................8 1.3.1 Login ..................................................................................................................................8 1.3.2 Logout ................................................................................................................................9 1.3.3 Setting Passwords ...............................................................................................................9 2. UNIX Shells ............................................................................. 10 2.1 Entering Commands ........................................................................................10 2.2 Path ..................................................................................................................12 2.3 Processes .........................................................................................................12 2.4 Standard Input, Output and Redirection ..........................................................13 2.5 Pipes ................................................................................................................14 2.6 Shell Scripts .....................................................................................................14 2.7 Filters ...............................................................................................................15 2.8 Regular Expressions ........................................................................................15 3. Working Environment ........................................................... 17 3.1 Environment Variables ....................................................................................17 3.1.1 Shell Variables and Environment Variables ......................................................................17 3.1.2 Setting Environment Variables ..........................................................................................17 3.1.3 Getting Values of Environment Variables .........................................................................18 3.1.4 A Summary of Some Useful Environment Variables ........................................................18 3.1.5 Changing Your Command Prompt .....................................................................................19 3.2 The Profile Files ..............................................................................................19 3.3 Terminal Characteristics ..................................................................................21 3.3.1 Keyboards ..........................................................................................................................21 3.4 Alias .................................................................................................................22 3.5 Recalling Commands: history .........................................................................23 3.5.1 tcsh Shell ............................................................................................................................23 3.5.2 zsh Shell Command Line Editing ......................................................................................24 3.5.3 Command Line Editing in Other Shells .............................................................................24 4. File System ............................................................................. 25 4.1 File Structure ...................................................................................................25 4.1.1 Naming Directories and Files .............................................................................................25 4.1.2 Rules for Naming and Accessing Files ..............................................................................25 4.2 List of Simple File System Commands ...........................................................26 4.2.1 Displaying the contents of a directory: ls ...........................................................................26 4.2.2 Changing the Working Directory: cd .................................................................................26 4.2.3 Determining Your Working Directory: pwd ......................................................................26 4.2.4 Creating a New Directory: mkdir .......................................................................................26 Table of contents 3 4.2.5 Removing an Existing Directory: rmdir .............................................................................27 4.2.6 Renaming a Directory: mv .................................................................................................27 4.2.7 Displaying the Contents of a File: cat,more, etc ................................................................27 4.2.8 Renaming a File: mv ..........................................................................................................28 4.2.9 Copying a File: cp ..............................................................................................................28 4.2.10 Creating Links ln ................................................................................................................28 4.2.11 Deleting a File: rm ..............................................................................................................28 4.2.12 File and Directory Permissions ..........................................................................................29 4.2.13 Determining Permission: ls -l .............................................................................................29 4.2.14 Changing Permission: chmod .............................................................................................30 4.3 File Backup ..................................................................................................... 30 4.4 AFS Overview ................................................................................................ 31 5. Communications ..................................................................32
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages71 Page
-
File Size-