Download CERN UNIX User Guide

Transcript
Table of contents
1.
Introduction ..................................................................................... 7
1.1 Getting a UNIX Account ...............................................................................7
1.2 Login, Logout, Setting Passwords ...................................................................7
1.2.1Login..................................................................................................................................
7
1.2.2Logout................................................................................................................................
8
1.2.3Setting Passwords ............................................................................................................... 9
2.
UNIX Shells ...................................................................................... 10
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
3.
Entering Commands ........................................................................................11
Path.................................................................................................................. 12
Processes .........................................................................................................12
Standard Input, Output and Redirection ..........................................................13
Pipes................................................................................................................ 14
Shell Scripts .....................................................................................................15
Filters ...............................................................................................................15
Regular Expressions ........................................................................................16
Working Environment .................................................................... 18
3.1 Environment Variables ....................................................................................18
3.1.1Setting Environment Variables .......................................................................................... 18
3.1.2Getting Values of Environment Variables ......................................................................... 19
3.1.3A Summary of some useful Environment variables .......................................................... 19
3.1.4Changing Your Command Prompt ..................................................................................... 20
3.2 The Profile Files ..............................................................................................21
3.3 Terminal Characteristics ..................................................................................23
3.3.1Keyboards
..........................................................................................................................
23
3.4 Alias
.................................................................................................................
24
3.5 Recalling Commands: history .........................................................................25
3.5.1C Shell
................................................................................................................................
25
3.5.2Korn Shell Command Line Editing .................................................................................... 26
3.5.3Command Line Editing in Other Shells ............................................................................. 26
4.
File System ....................................................................................... 27
4.1 File Structure ...................................................................................................27
4.1.1Naming Directories and Files ............................................................................................. 27
4.1.2Rules for Naming and Accessing Files .............................................................................. 27
4.2 List of Simple File System Commands ...........................................................28
4.2.1Displaying the contents of a directory: ls ........................................................................... 28
4.2.2Changing the Working Directory: cd ................................................................................. 28
4.2.3Determining Your Working Directory: pwd ...................................................................... 28
4.2.4Creating a New Directory: mkdir ....................................................................................... 28
4.2.5Removing an Existing Directory: rmdir ............................................................................. 29
4.2.6Renaming a Directory: mv ................................................................................................. 29
4.2.7Displaying the Contents of a File: cat,more, etc ................................................................ 29
4.2.8Renaming a File: mv .......................................................................................................... 30
Table of contents
3