"
".
,
, :
lpr chap[1-49]*
( , 49 ,
.)
: "[a-z]"
"a" "z".
,
ls ?
, ,
ls -l chap?.1
(..
chap1.1, chap2.1 ...).
( '*', '?' [...]) - -
-, .
,
"?", :
ls '?'
, 4 " -
XENIX", " ".
- 17 -
3.4.
.
, XENIX
, ,
, .
,
, .
.
3.4.1.
, ,
, XENIX -
. -
,
,
. -
, -
, ,
.
. ,
, ,
,
RETURN.
-
BKSP Ctrl-u. RETURN
. -
. INTERRUPT ,
RETURN, -
.
, ,
(';'). ,
, :
date; pwd
, ('&')
.
"" c. -
,
.
du /usr>>diskuse&
, ,
/usr,
, . ,
- 18 -
diskuse
. -
3.6.1.
3.4.2.
:
cmd [][][][...]
,
. -
. -
.
('-') . ,
ls -l ( " ")
,
ls -r
.
, . -
,
ls -rl
, -rl
, -
.
,
:
copy -a -v
-a ,
. -v ,
.
, ,
, :
grep ' ' _
' '
,
grep _. -
, ,
- 19 -
.
-
, C
- .
, -
" ".
4 XENIX
" ".
3.5.
, XENIX ,
c ,
.
, :
cat
.
, -
Ctrl-d
.
:
RETURN
RETURN
Ctrl-d
Ctrl-d, . cat
.
,
.
:
$ cat
, ,
,
, . , -
"" ,
. -
- -
.
cat , -
, ,
Ctrl-d .
- 20 -
3.5.1.
XENIX
, . -
:
ls
.
ls > _
_
( , -
). ,
, ('>>'), "
, -
".
,
cat :
cat f1 f2 f3 > temp
('>>>>'), ,
, , -
" ". :
cat file1 file2 file3 > temp
" file1, file2 file3
temp, , ,
".
, temp ,
.
, ('<<')
" ,
". -
script.
:
ed < script
letter.txt,
:
mail adam eve mary joe < letter.txt
- 21 -
3.5.2.
XENIX
" ".
-
, ,
, .
:
sort frank.txt george.txt hank.txt
frank.txt, george.txt
hank.txt, . ,
. :
sort frank.txt george.txt hank.txt > temp1
uniq < temp1 > temp2
more temp2
rm temp1 temp2
, .
, sort
uniq, uniq
more.
:
sort frank.txt george.txt hank.txt | uniq | more
('|')
sort uniq ,
sort, ,
uniq,
more .
-
. ,
-
:
ls | pr -3
wc ,
, who -
, ,
. ,
, ,
who:
who | wc -l
- 22 -
:
ls | wc -l
wc -l
wc. , wc ,
. wc -l
.
, -
,
. , -
, .
,
.
4.
4.1.
,
XENIX. ,
,
XENIX.
4.2.
, XENIX,
.
. ,
. -
, ,
.
4.2.1.
, ,
"".
,
.
-
, ,
,
- . -
,
-
mkuser(C)
XENIX. ,
- 23 -
.
, , -
"login:".
,
INTERRUPT.
"login:", -
:
1. RETURN.
, Ctrl-u
. , RETURN,
"Password:".
2. ,
RETURN.
, -
. , RETURN -
.
,
"-".
('$'). , -
XENIX .
, :
Login incorrect
login:
,
. ,
;
.
, ,
,
, - : "
XENIX", , -
.
4.2.2.
,
Ctrl-d
. , XENIX Ctrl-d
,
- 24 -
.
Ctrl-d ;
, -
. , -
Ctrl-d , -
. , mail,
Ctrl-d ,
, ,
.
4.2.3.
, -
,
.
,
.
XENIX ,
.
, ,
-
. , .
passwd.
:
1 :
passwd
RETURN. :
Changing password for
Old password:
2 . -
. ,
RETURN. "Sorry", -
. 1.
3 , , -
:
New password:
RETURN.
4 :
Re-enter new password:
. ,
- 25 -
RETURN. :
They don't match; try again
1.
, -
.
4.3.
XENIX. XENIX
. , -
, ,
. , , -
.
.
4.3.1.
, ,
. -
,
, , , ,
. -
.profile -
. ,
tset, -
:
eval 'tset -m :\?unknown -s -r -Q'
unknown () -
. ,
vt100, :
eval 'tset -m :\?vt100 -s -r -Q'
-
:
TERM = (vt100)
RETURN, vt100
,
RETURN.
- 26 -
4.3.2.
,
stty.
. ,
:
speed 9600 baud
erase '^h' ; kill '^u'
even -nl
stty.
stty(C)
XENIX.
4.4.
, -
. .
4.4.1.
RETURN.
RETURN
.
, ,
, XENIX
.
4.4.2.
(). ,
Ctrl-u.
4.4.3.
.
, .
-
Ctrl-s.
Ctrl-q.
- 27 -
4.5.
(, , -
, , , -
) -
, .
, -
.
4.5.1.
, -
vi, 2
XENIX, "vi: ".
- ,
:
> _
_ - . ,
.
4.5.2.
more -
. :
more _
more , -
, . ,
memos, :
more memos
more , -
,
.
:
+_
,
_.
+/
,
- .
,
.
-c .
- 28 -
-r , -
.
, memo ,
"net gain", :
more +/"net gain"
,
.
:
RETURN
.
d .
.
n
n .
. .
,
.
/.
, "net gain", -
:
/net gain/
RETURN. more :
...skipping
, ,
-
"net gain".
more ,
, vi,
:
v
2 "vi: "
XENIX
- 29 -
vi.
more ,
.
, :
q
head tail , ,
.
.
,
memo, :
head memo
, -
head tail. :
tail -4 memo
memo.
cat . -
, Ctrl-s,
. Ctrl-q,
.
.
, INTERRUPT.
, :
cat file1
, :
cat file1 file2 file3
4.5.3.
cat -
.
, file1
file2 bigfile, :
cat file1 file2 >bigfile
, -
bigfile. ('>>')
cat
.
- 30 -
cat
. ,
file1 file2, :
cat file1 >> file2
file1 file2. file1
.
4.5.4.
mv
.
, , ,
, , :
mv
,
.
,
mv
. ,
file1 file2 /tmp, :
mv file1 file2 /tmp
, /tmp.
,
:
mv file1 /tmp
mv file2 /tmp
mv ,
, , ,
-
.
4.5.5.
, ""
: .
, ,
anon johndoe, :
mv anon johndoe
- 31 -
,
.
4.5.6.
cp:
,
. ,
filer, :
cp file1 file2 file3 filer
filer; -
. , .
mv, cp ,
, ,
, ,
.
,
. ,
, -
:
cp file filecopy
-
.
4.6.7, " ",
.
4.5.7.
, :
rm file1 file2
file1 file2
.
:
rm -i file1 file2
, -
,
file1 file2. y,
RETURN, ; n,
.
, .
- 32 -
4.5.8.
find -
.
, ,
, .
:
find _ -name _ -print
_ - ,
. find ,
,
, _.
-name ,
_. (
find, find(C) -
XENIX.)
_ - , .
-print ,
, -
_. -
, -
('>>'). ( ,
find,
; find(C) -
XENIX.) ,
memo /usr/joe -
:
find /usr/joe -name memo -print
, , :
/usr/joe/memo
/usr/joe/accounts/memo
/usr/joe/meetings/memo
/usr/joe/mail/memo
4.5.9. (-
)
ln
, -
, .
,
, , -
.
- 33 -
:
ln _
- , _ - ,
-. ,
memos /usr/joe -
joememos /usr/mary:
ln /usr/joe/memos /usr/mary/joememos
/usr/joe/memos ,
/usr/mary/joememos.
, - -
i-. i-
.
. ,
, 1/1
2/2 .
, :
1.
.
2. -
,
, , ,
-.
3.
. , -
, . ,
, ,
.
. ln(C)
XENIX.
4.6.
- -
XENIX -
.
.
, .
,
.
- 34 -
4.6.1.
.
pwd, -
"print