? e?t??? ln - PowerPoint PPT Presentation

1 / 33
About This Presentation
Title:

? e?t??? ln

Description:

ln ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 34
Provided by: IE57
Category:
Tags: lempel

less

Transcript and Presenter's Notes

Title: ? e?t??? ln


1
? e?t??? ln
  • ?? ???µa e??? a??e??? e??a? ap??? µ?a s??des?
    µe t?? p?a?µat??? ?ata????µ??? p????f???a.
  • ??a a??e?? µp??e? ?a ??e? ??a ? ?a? pe??ss?te?a
    ???µata (s??d?se??).
  • ?a ep?p???? ???µata d?µ????????ta? µe t??
    e?t??? ln p?? s??t?sseta? ??

ln -s file_old file_new
2
link . . .
  • ??a ???? µ??f? s??ta??? e??a?

ln -s file1 file2 ... Dir_name
  • ??µ????????ta? st?? ?at????? Dir_name
    s??d?se?? µe ta a??e?a file1 file2
  • µe ta ?d?a ???µata.
  • ??? ta ???µata a?t? p???p?????? st?? ?at?????,
    ?atast??f??ta? ?a? pa?????? t?? ??s? t??? ta ??a.

3
link . . .
  • ? e?t??? ln de? d?µ?????e? ??a a??e?a, ap???
    ep?p???? ???µata ??a t? ?d?? a??e??.
  • ?etaß???? st? a??e?? µp????? ?a ??????
    ???s?µ?p????ta? ?p???d?p?te ap? ta ???µat? t??
    (links).
  • ?? s?µß??? p?? d????e? ?t? ??a ???µa a??e???
    a?t?st???e? se link (?a? eµfa???eta? ?? p??t??
    ?a?a?t??a? st? output t?? e?t???? ls -l ) e??a?
    t? l.

4
? e?t??? mv
mv file1 file2
  • ?e t?? pa?ap??? s??ta?? t? a??e?? file1
    µet???µ??eta? ?? file2

mv file1 file2 ... Dir_Name
  • ?e t?? pa?ap??? s??ta?? ta a??e?a file1 file2
    ... µetaf????ta? d?at????ta? ta ?d?a ???µata st??
    ?at????? p?? ?p?de????eta?.

5
?a?ade??µata
  • ??? ? ?at?????? house pe????e? ta a??e?a kit,
    bed, room ?a? ? ?at?????? solo e??a? ?e???,
    t?te ? e?t???
  • mv house/ solo
  • µetaf??e? ??a ta a??e?a t?? house (kit, bed,
    room) st?? ?at????? solo ?a? ta d?a???fe? ap?
    t?? ?at????? house.
  • ? e?t??? mv house/kit house/fork µet???µ??e?
    t? a??e?? kit se fork (e?t?? t?? ?ata????? house).

6
? e?t??? cp
cp file1 file2
  • ?e a?t? t?? s??ta?? a?t????feta? t? a??e?? file1
    st? file2.

cp file1 file2 ... Dir_Name
  • ?e a?t? t?? s??ta?? a?t????f??ta? ta a??e?a
    file1, file2, ... µe t? ?d?? ???µa st?? ?at?????
    p?? a??????e?.

7
cp -r . . .
cp -r file1 Dir1 file2 ... Dir_Name
  • ?e a?t? t?? s??ta?? a?t????f??ta? ta file1 Dir1
    file2 ... st?? ?at????? Dir_Name ef?s?? ?
    ?at?????? ?p???e?.
  • ? ?at?????? Dir1 a?t????feta? p?????, d??ad?
    a?t????f??ta? ??a ta pe??e??µe?? t?? a??e?a,
    ?at?????? ??p.

8
cp -r . . .
  • ??? ? ?at?????? Dir_Name de? ?p???e?, t?te
    d?µ?????e?ta?, a??? ? s??ta?? p??pe? ?a pe????e?
    µ??? e?a ?at????? p??? a?t???af? ?a? t?p?te ????.
    ??

cp -r Dir1 Dir_Name
9
? e?t??? rm
rm file1 file2 ...
  • ??a???fe? ta a??e?a file1 file2 ...

rm -i file1 file2 ...
??a???fe? ta a??e?a file1 file2 ... ?a? ??t?
ep?ßeßa??s? ap? t?? ???st? (Y ? y)
rm -r Dir1 file1 Dir2 ...
??a???fe? a??e?a ?a? ep?s?? ?ata?????? µa?? µe ta
pe??e??µe?? t???.
10
? t?µ? umask
  • ?ta? d?µ?????e?ta? ??a a??e?? ?a???????ta?
    ep?s?? ?a? ta d??a??µata ??a t?? d??f??e?
    ?at?????e? ???st??.
  • S?????? ??a a??e?a p?? pe??????? ?e?µe?? ?
    ded?µ??a, ta d??a??µata e??a? rw-rw-rw- (666) ?a?
    ??a e?te??s?µa a??e?a rwxrwxrwx (777).
  • St?? s????e?a ta d??a??µata µetaß?????ta?
    s?µf??a µe t?? t?µ? umask (user mask) ? ?p??a
    ?a?????eta? ap? t?? ???st?.

11
? ????? t?? t?µ?? umask
  • ? t?µ? umask e??a? ??a? t????f??? a???µ?? t??
    ??tad???? s?st?µat??.
  • H t?µ? a?t? afa??e?ta? ap? ta d??a??µata p??
    d?µ????????ta? a?t?µata ??a t? a??e??.
  • ??? p? ? t?µ? e??a? 002 t?te ta a??e?a ded?µ????
    ? ?e?µ???? ap??t??? d??a??µata 664 ( 666 - 002).
    ?a de e?te??s?µa 775.
  • S?????? t?µ? ??a t? umask e??a? 022. ?fa??e? t?
    d??a??µa µetaß???? ap? ????? p??? t?? ?d???t?t?.

12
? e?t??? umask
umask
  • ?e t?? pa?ap??? s??ta?? ep?st??fe? t?? t?????sa
    t?µ? t?? umask.

umask 026
  • ?e t?? pa?ap??? s??ta?? t??eta? ? ??a t?µ? t??
    umask (st? pa??de??µa ? t?µ? 026, p?? afa??e? ap?
    t? group t? d??a??µa w ?a? ap? t??? others ta wr
    ).

13
? e?t??? chown
  • ?a?????e? t?? ?d???t?t? e??? a??e???.

chown owner file
  • ?e t?? pa?ap??? e?t??? ? ???? ?d???t?t?? t??
    a??e??? file e??a? ? owner .
  • ???? ? ?d???t?t?? e??? a??e??? (? ? super-user)
    ??e? d??a??µa ?a ???s?µ?p???se? a?t? t?? e?t???.

14
? e?t??? chgrp
  • ?a?????e? t?? ?µ?da e??? a??e???.

chgrp group file
  • ?e t?? pa?ap??? e?t??? ? ??a ?µ?da t?? a??e???
    file e??a? t? group .
  • ???? ? ?d???t?t?? e??? a??e??? (? ? super-user)
    ??e? d??a??µa ?a ???s?µ?p???se? a?t? t?? e?t???.

15
? e?t??? mkdir
  • ?atas?e???e? ????? ?e???? ?ata??????.

mkdir Dir1 Dir2 ...
  • ? pa?ap??? e?t??? d?µ?????e? t??? ?e????
    ?ata?????? Dir1, Dir2 ...
  • ??? ??p???? ap? t??? ?ata?????? ?d? ?p???e?,
    t?te t? Unix "d?aµa?t??eta?" ?a? ? ???st?? p??pe?
    ?a ap?fas?se? t? ?a ???e?.

16
? e?t??? rmdir
rmdir Dir1 Dir2 ...
  • ??a???fe? ?ata?????? ef?s?? e??a? "?de???"
    (?e???).
  • ?at?????? p?? pe??????? a??e?a ? ??????
    ?ata?????? de? d?a???f??ta? µe t?? e?t??? a?t?.

17
compress ?a? uncompress
  • "S?µp??????" ?a? ap?s?µp?????? a??e?a.
  • ? ???s?µ?p????µe??? a??????µ?? e??a? ? Lempel-Ziv.

compress file ...
  • S?µp???e? ta a??e?a file ... ?a? ta µet???µ??e?
    se file.Z, ...
  • ?a a??e?a file ..., de? ?p?????? p????.
  • ? e?t??? s??t?sseta? ?a? µe pa?aµ?t????.

18
compress
compress -c file ...
  • G??fe? ta s?µp?esµ??a a??e?a st? standard output
    ?a? d?at??e? ta a????? a??e?a ?? e??a?.

compress -v file ...
  • ?µfa???e? ??a ???e s?µp?e??µe?? a??e?? t? p?s?st?
    t?? s?µp?es??.

19
uncompress ?a? zcat
uncompress file.Z ...
  • ?p?s?µp???e? ta a??e?a file.Z ... ?a? ta
    µet???µ??e? ?? file ...
  • ?? pa??µet??? -c ?a? -v ?e?t??????? ?p?? ?a? st??
    e?t??? compress.

zcat file.Z
H pa?ap??? e?t??? e??a? ?s?d??aµ? µe
uncompress -c file.Z
20
?a?et???sµa a??e???
  • Ta pe????afe? ? e?t??? tar p?? p?????eta? ap?
    t?? ???e?? tape archive.
  • ?????? ? e?t??? tar ???s?µe?e ??a a?t???af?
    a??e??? se µa???t??? ta??e?a.
  • ????? ???s?µ?p??e?ta? ??a pa?et???sµa e???
    ????????? ?ata????? p?? pe????e? p???? a??e?a ?a?
    ?p??ata??????, se ??a ?a? µ??? a??e?? e?d????
    µ??f??.

21
? e?t??? tar
tar cvf package Dir
  • ??µ?????e? t? a??e?? e?d???? µ??f?? package p??
    pe????e? pa?eta??sµ??a ??a ta pe??e??µe?a t??
    ?ata????? Dir

tar xovf package
  • ?p? t? a??e?? e?d???? µ??f?? package
    a?apa???eta? ? a?????? ?at?????? Dir ?a? ??a ta
    pe??e??µe?? t??.

22
? e?t??? tar
  • ? e?t??? tar e??a? ?d?a?te?a ???s?µ? ??a
    µetaf??? ???? ????????? ?ata????? µe p???? a??e?a
    ap? ??a? ?/? se ?????.
  • ?a?et??eta? p??ta ? ?at?????? ?a? st?? s????e?a
    µetaf??eta? µ??? ??a a??e?? (t? pa?eta??sµ???).
  • ?et? t?? µetaf???, a?apa???eta? ? a??????
    ?at?????? µe ta pe??e??µe?? t??.
  • ? e?t??? tar s??t?sseta? µe pa?aµ?t???? ????? t??
    p??ta?? t?? pa??a? (-).
  • G?a pe??ss?te?e? ?ept?µ??e?e? man tar

23
? ??t??? more
  • ?p?t??pe? t?? e??tas? e??? a??e??? se??da p???
    se??da. S??t?sseta? ??

more file
  • ?µfa???e? t?? p??t? se??da t?? a??e??? file st??
    ?????.
  • ? ep?µe?? se??da eµfa???eta? ?ta? p???t???????e?
    ??a ?e??.
  • ? p??????µe?? se??da epa?eµfa???eta? e??
    p???t???????e? t? ???µµa b (back).
  • ? e??tas? d?a??pteta? µe t? ???µµa q (quit).

24
???se?? t?? e?t???? more
  • ?d?a?te?a ???s?µ? se s??d?asµ? µe e?t???? p??
    pa?????? µe???? ???d?. ??
  • ls -l more
  • ? ???d?? t?? e?t???? ls -l ?a eµfa??ste? se??da
    p??? se??da.
  • ????? p?????e? ? p??t? se??da, ? ???d?? staµat?
    p??s????? ?a? pe??µ??e? e?t??? (?e?? ? q) ??a t??
    eµf???s? t?? ep?µe??? se??da? ? ??a t??
    te?µat?sµ? t?? eµf???s?? pe?a?t??? se??d??.

25
??t?p?se??
  • Ta pe????af??? ?? s?et???? e?t???? ?a? t?? d??
    e?d?se?? t?? Unix.
  • ?? e?t???? lp, lpstat, cancel (System V)
  • ?? e?t???? lpr, lpq, lprm (BSD Unix)
  • lp ?a? lpr st?????? a??e?a st??? e?t?p?t??.
  • lpstat ?a? lpq ??t??? p????f???e? ??a t??
    p??e?a t?? e?t?p?s??.
  • cancel ?a? lprm a???????? p??????µe?e? e?t????
    e?t?p?s??.

26
? e?t??? lp ( System-V )
lp file ...
  • St???e? p??? e?t?p?s? ta a??e?a file ...
  • S??t?sseta? µe pa?aµ?t????.

lp -flag arg file ...
  • H pa??µet??? flag ?a? t? ???sµ? t?? arg
    pa?????? t?? pa?a??t? t?µ??.
  • -d printer (?a?????e? t?? e?t?p?t?)
  • -n number (?????? t?? a?t?t?p??)
  • -c (??µ?????e? a?t???af? t?? a??e???
  • t? ?p??? ?a? st???e? ??a e?t?p?s?)

27
?a?ade??µata
  • G?a e?t?p??e? t? a??e?? test.f st?? e?t?p?t? µe
    t? ???µa hp, se t??a a?t?t?pa

lp -n 3 -d hp test.f
  • G?a e?t?p??e? t? a??e?? test.f st?? e?t?p?t? p??
    d?a???e? ? ?/? a?t?µata, ? e?? ?p???e? ??a? ?a?
    µ??ad???? e?t?p?t??

lp test.f
28
? e?t??? lpstat ( System-V )
  • ???e? p????f???e? ??a t?? ?at?stas? t??
    e?t?p?se?? ?a? t?? ?pa????t?? e?t?p?t??.
  • S??t?sseta? µe p????? pa?aµ?t???.
  • ?e?????f??ta? ?? p?? s?µa?t????.

??d??ta? p????f???e? µ??? ??a t?? e?t?p?se?? t??
???st?.
lpstat
??d??ta? p????f???e? ??a t?? e?t?p?se?? t??
???st? user.
lpstat -u user
??d??ta? ??e? ?? d?a??s?µe? p????f???e?.
lpstat -t
29
? e?t??? cancel ( System-V )
  • ??a??e? p??????µe?? e?t??? e?t?p?s?? (ef?s?? a?t?
    a??µ? e???eµe?).
  • S??t?sseta? ??
  • ??????e? t?? e?t?p?s? ?p' a???µ. id
  • O a???µ?? id a?a??????eta? ?ta? d??eta? ?
    e?t??? ??a e?t?p?s? (lp) ?a? ep?s?? ap? t??
    e?t??? lpstat.
  • ??a??a?t??? s??ta??
  • ??????e? t?? t?????sa e?t?p?s? st?? e?t?p?t?
    printer.
  • O ???e ???st?? µp??e? ?a a?????e? µ??? t??
    d???? t?? e?t?p?se??.

cancel id
cancel printer
30
? e?t??? lpr ( BSD )
lpr file ...
  • St???e? p??? e?t?p?s? ta a??e?a file ...
  • ??µ????????ta? p??ta a?t???afa t?? a??e??? ta
    ?p??a st?? s????e?a st?????ta? ??a e?t?p?s?.
    (??t??eta µe t?? lp)
  • S??t?sseta? µe pa?aµ?t????. (?e????? e? a?t??
    pa?at??e?ta? st?? s????e?a)
  • G?a pe??ss?te?e? ?ept?µ??e?e? man lpr

31
lpr . . .
lpr -flag arg file ...
  • H pa??µet??? flag ?a? t? ???sµ? t?? arg pa??????
    t?? pa?a??t? t?µ??.
  • -P printer (?a?????e? t?? e?t?p?t?)
  • number (?????? t?? a?t?t?p??)
  • -s (?e? d?µ?????e? a?t???af? p??? t??
    e?t?p?s?)

32
? e?t??? lpq ( BSD )
  • ?p?? ?a? ? e?t??? lpstat, d??e? p????f???e? ??a
    t?? ?at?stas? t?? e?t?p?se?? ?a? t?? ?pa????t??
    e?t?p?t??.
  • S??t?sseta? µe p????? pa?aµ?t???.

??d??ta? p????f???e? ??a ??e? t?? e?t?p?se?? t??
s?st?µat??.
lpq
G?a pe??ss?te?e? ?ept?µ??e?e? man lpq
33
? e?t??? lprm ( BSD )
  • ??a??e? p??????µe?? e?t??? e?t?p?s?? (ef?s?? a?t?
    a??µ? e???eµe?).
  • S??t?sseta? ??
  • ??????e? t?? e?t?p?s? ?p' a???µ. id
  • O a???µ?? id ???eta? ???st?? µe t?? e?t???
    lpq.
  • O ???e ???st?? µp??e? ?a a?????e? µ??? t??
    d???? t?? e?t?p?se??.

lprm id
Write a Comment
User Comments (0)
About PowerShow.com