Escolar Documentos
Profissional Documentos
Cultura Documentos
What is UNIX?
History (Brief)
1969
1970s
1980s
System V release 4
TCP/IP
Sun Microsystems
Solaris
Microsoft Xenix, SCO
MIT X-Windows
1990s
GNU, LINUX
Stallman, Torvalds
multi-tasking / multi-user
lots of software
networking capability
graphical (with command line)
easy to program
portable (PCs, mainframes,
super-computers)
continued
Your Account
Password:
commands.
or
^D
or
exit
On-line Help
man
Manual pages
Spacebar to go on; ^C to stop
man gnuchess
man man
apropos topic
apropos game
apropos help
Lists commands
related to topic
UNIX Books
s
ba
ta
s
Da
ge
e cka
Pa
l
Int
t T erne
oo
ls
S
h
ell
Us
e
Sh
el
Hardware
Kernel
Compilers
e
Us
r
l
el
h
S
er
s
U
e
Us
r
d
an
x
ni m
U m
Co
n/
o
ti e
a
lic war
p
p oft
A
er m S
h
Ot ste
Sy
ell
h
S
Kernel-Shell Relationship
The Shell
the shell
process
command
execute
command
Typing Commands
Try these:
date
cal 3 2005
who
ls -a
man cal
clear
Date Commands
date
cal
Calendar
cal 1997
cal 3
cal 7 1962
cal 9 1752
uptime
hostname
Machines up time
Name of the machine
whoami
Your name
who
Calculators
expr e
Simple arithmetic
expr 3 + 5 + 7
bc
Programmable
Calculator
locate
more
passwd
echo
banner
tty
uname
hostname
tput
quota
spell
whoami
apropos
whatis
which
ispell
cat
sort
pwd
The File
Ordinary Files
Directory Files
Device Files
etc
...
bin
date. . . cal
usr1
faculty
mj
dev
...
tmp
...
rootdirectory
/bin
commands
/etc
/dev
Pathnames
absolute pathnames
relative pathname
Absolute Pathnames
Relative Pathnames
proj1:
For example:
/usr/games/fortune
cat /etc/passwd
s3910120
hobby.c
proj1
proj2
...
...
pwd
/
.
directory
..
Examples
cd /
cd ~
cd
cd ../..
Usecd
cat file
List file
cd /etc
cat passwd
ls
ls
ls /etc
Directory listing
Listcurrentdir.
List/etc
Make a directory
Delete a directory
Rename a directory
Permissions
ls l /etc/passwd
-rw-r--r--
root
directory
1 root
owner
chmod
-w, +w .
group everyone
Information on Others
users
who
ps
ps -au
w
w -sh
Fingering People
finger
finger -l
finger user
finger ad
Information on user
(need not be logged in)
finger @machine-name
that machine
finger @catsix
finger @ratree.psu.ac.th
ping machine-name
alive (on)?
ping catsix (^C tostop)
Is machine
chfn
Talking
talk user
Talk to user
(on any machine)
talk ad
talk bill-gates@ratree.psu.ac.th
write user
user
Send a message to
on this machine
write ad
mesg n
mesg y
Sending E-mail
Send mail :
mail Add
The vi Editor
Two modes
Insert i
Command <ESC>
Append a
Replace character r, Replace word R ..
Deleting character x, Deleting line dd
Exit
Goto command mode press :wq
Filters
grep
Some option
Character sets
grep : RE
End of line
[]
\c
Specifying pattern
boundaries
^r pattern beginning
with expression r
^[^r] pattern not
beginning with
expression r
r$ pattern ending with
expression r
[^]
r*
r1r2
fgrep
sort
comm
Comm 12 f1 f2
tr
tr a-z A-N
Assignment
1.
2.
3.
4.
5.
6.