Beruflich Dokumente
Kultur Dokumente
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Section 3
About UNIX
3-1
Objectives
This section introduces UNIX to those who are new to UNIX, and helps the
other students to recall the basic functions and commands of UNIX.
"Confidential information -- may not be copied or disclosed without permission".
UNIX Overview
"Confidential information -- may not be copied or disclosed without permission".
Devices Management
Text Editor
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Student Notes
3-4
"Confidential information -- may not be copied or disclosed without permission".
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
UNIX Overview
3-5
UNIX Overview
a password
an environment
name: root
omc::100:omc,rot
Format:
Format:
omc : user name
X : see /etc/shadow
102 : user identity number (one-of-a-kind)
100 : number of users group
omc account : comments
/home/omc : home directory
/bin/csh : command executed at log in time
home
Account Password uid gid process
directory
Access rights
u g o
u = user g = group o = other
each - stands for the users rights in:
r = read mode
w = write mode
x = run mode
The home directory in the user accounts contains the files defining the
environment
"Confidential information -- may not be copied or disclosed without permission".
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Student Notes
3-14
"Confidential information -- may not be copied or disclosed without permission".
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Some Basic UNIX Commands
3-15
Some Basic UNIX Commands
The ls command
Purpose : lists a directorys contents
"Confidential information -- may not be copied or disclosed without permission".
Options :
Introduction
The pwd command shows in what directory you currently reside.
Description
The command pwd stands for print working directory. It prints the path name
"Confidential information -- may not be copied or disclosed without permission".
pwd
/home/omc
cd..
pwd
/home
cd..
pwd
/
The ps command
Purpose : obtains the list and states of processes
"Confidential information -- may not be copied or disclosed without permission".
Structure : ps [options]
Main options:
e: informs the user each time a process is executed
d: informs the user each time a process is executed, except
when process group parents are executed
a: informs the user each time the mostused processes are
executed
f : gives full information about the processes displayed by
the above options
The lp command
"Confidential information -- may not be copied or disclosed without permission".
Main options:
-m : prints the file then mails the job report
The cp command
The rm command
"Confidential information -- may not be copied or disclosed without permission".
Main options:
-f : silently
-r : recursively
-i : interactively
Main options:
Main options:
"Confidential information -- may not be copied or disclosed without permission".
Main options :
The cd command
"Confidential information -- may not be copied or disclosed without permission".
Structure : cd path_of_file_to_reach
Special characters:
. : any character
"Confidential information -- may not be copied or disclosed without permission".
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Some Advanced UNIX Commands
3-31
Some Advanced UNIX Commands
Purpose :
Options:
c back up to a blank tape
r back up at the end of a tape containing tar command results
x restore from a tape or extract from another machine
t list tape contents
v verbose
p keep same rights
Main options :
Main options :
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Devices Management
3-43
Devices Management
Numbering:
/dev/dsk/ c0 t3 d0 s0
Number of partition
SCSI logical unit number
SCSI target
SCSI controller number
Access to CD-ROM
automatic with File Manager
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Student Notes
3-46
"Confidential information -- may not be copied or disclosed without permission".
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Text Editor
3-47
Text Editor
Text editor: VI
Features:
"Confidential information -- may not be copied or disclosed without permission".
standard
full screen display
2 modes: line mode and command mode
~ indicate additional lines
Command mode:
[ESC] for enter
1, 2, or 3 character requests
:q : to quit
:w : to save
:x : to quit and save (for system files and root user only)
Cut
x : a character
"Confidential information -- may not be copied or disclosed without permission".
dw : a word
dd : a line
D : end of line
Copy
Y : a line
Paste
p : after below
P : in front of above
Moving around
Character / word
"Confidential information -- may not be copied or disclosed without permission".
Line
H, L : first line, last line
0, $ : start, end of line
nG : go to line n
Screen
^F and ^B : next page and previous page
^L : refresh screen
Inserting text
"Confidential information -- may not be copied or disclosed without permission".
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Student Notes
3-53
"Confidential information -- may not be copied or disclosed without permission".
PE/TRD/CN/0303 12.02/EN
March, 2000
About Unix
Student Notes
3-54