UNIX - PowerPoint PPT Presentation

1 / 45
About This Presentation
Title:

UNIX

Description:

unix ... – PowerPoint PPT presentation

Number of Views:171
Avg rating:3.0/5.0
Slides: 46
Provided by: computer73
Category:
Tags: unix | computer | science | wine

less

Transcript and Presenter's Notes

Title: UNIX


1
UNIX
2
??????????????
  • ???????????????????????????
  • ??????????????????????????(Open System)
    ??????????????????????????????????????????????????
    ??????
  • ??????????????????????????(Multi-users)
  • ???????????????????????????????????????????
    (Multi-tasking)
  • ??????????????????????????????????????
    ???????????? ???????????????

3
????????????????????
  • Kernel
  • Shell
  • Utilities

H/W
4
Kernel
  • ????????????????????????????? ?????????
  • ????????????????????????????????????????????
  • ?????????????????????
  • ?????????????????
  • ?????????????????????????????????????????
  • Kernel ?????????????????????????
    ?????????????????????????????????

5
Shell (command Interpreter)
  • ???????????????????????????????????????????????
    Kernel
  • ??????????????????
  • ??????????????????????????????????????????????????
    Shell script
  • ???????????????????????? Input/Output

6
shell ??????????
  • Bourne Shell ???????????????????? ALGOL
    ????????????????????????????
  • C Shell ??????????????????????????????? C
  • ????????????????????????????
  • Korn Shell ?????????????????????????????????? ???
    Kernel ???????????????????????

7
File System
  • ???????????????????????? (Hard Disk)
  • ?????????????????????????(Files)
    ?????????????(directory)
  • ?????????????????????????
  • ??????????????????? ? ???????????????????????????

8
???????????????????????????
  • System Administration
  • ????????????????????????????? System
    Administration???????????
  • User ID (UID) ????????????????????????
  • Group ID (GID) ??? ??????????????????????
  • Password ???????????

9
????????????????? UNIX
  • ??????????? Telnet ??????????????????????????????
    ?????????????? ???? hw.compsci.buu.ac.th

Telnet hw.compsci.buu.ac.th
10
?????????????? UNIX
11
???????????????
  • ???????????????????????? 6 ???
  • ???????????????? ?????????????????????????? 1 ???
  • ???????????????????????????????????????? 3 ???
  • ???????????????????????? passwd

12
(No Transcript)
13
?????? Online Manual
  • ????????? man
  • ??????
  • man Command
  • ????????
  • man ls

14
??????????????(logout)
  • ???????????
  • exit
  • logout
  • Ctrl - d

15
Unix File System
16
?????????????
  • Regular File(-) ??????????????????????? Editor
    ?????????????????????? ???
  • Directory (d) ??????????????????????? ? ????
    directory
  • ???????????? / ??? root directory
  • Character device file (c) ?????????????????
    ????????
  • Block device file (b)
  • UNIX domain sockets (s) ?????? BSD Unix
  • Name pipes (p) ??? ATT
  • Symbolic link (l)

17
??????????????????? directory
  • ?????????????????????????????????
    ?????????????????????? ( ) , lt gt /
  • ??????????????????????
  • ??????????????????????????????????????????
  • ????????????????????? Argument ???????????????????
    ?????????????? 225 ???

18
???????????????????????????? directory
  • ???????????????????????? directory ???????????
    directory ??? directory ?????????????? /
    ???????????
  • Absolute Path Name ??????????????????????????????
    directory ???? /unix, /usr/home/seree,
    /etc/passwd
  • Relative Path Name ???????????????????????
    directory ??????????????????????????????????
  • . (current directory)
  • .. (parent directory)
  • ./office (relative from current directory)
  • ../office (relative from parent directory)

19
Home directory
  • Home directory ???? directory ?????????????
  • ?????????? seree
  • home directory ??? /usr2/home/seree

20
??????????????????????
  • clear ???????
  • date ??????????
  • logname ??????????????
  • hostname ???????? Host
  • cal ?????????????????????????????????
  • cal 1997 ????????????. 1997
  • cal 10 1997 ?????????? ??????????? ??. 1997

21
??????????????????????
  • banner HELLO ??????????????????
  • echo I Love You ??????????????????
  • whoami ????????????????????????
  • who am i ????????????????? ??????????????????
    ?????? ???????
  • pwd ???????? directory ????????????????

22
?????????????????????? file ??? directory
23
?????? ls
  • ??????????????????????????????????????????????
    ?????????????
  • ?????? ls option filename
  • option
  • -a ??????????????????????????????????????
    ??????????????????????????????????? .??????????
    ????????????????? ???????
  • -b ?????????????????????????????? ??????????
  • -c ????????????????????
  • -d ????????????????????????????????????
    ?????????????????

24
?????? ls (???)
  • -f ?????????????????????? / ????????????????????
    ??? ?????????????? ?????????????????????????
  • -l ????????????
  • ????????
  • ls
  • ls -l
  • ls -la
  • ls -f

25
?????? cd (Change directory)
  • ????????????????? ????? directory ??????????????
  • ?????? cd directory_name
  • ????????
  • cd /usr2/home/seree
  • cd ../seree
  • cd
  • cd ..

26
?????? cp
  • ??????????????????????????????????????????????
    ??????????????? COPY ??????????????? DOS
  • ?????? cp option source_filename
    dest_filename
  • -i ????????????????????????????????????????
    ?????????????????????
  • -p ????????????????????????????????????????
    ???????????
  • -r ?????????????????????????????????????????? ???
    ???????????????????????? ? ????????????????
    ???????? ? ???????

27
?????? cp (???)
  • ????????
  • 1. ?????????
  • cp letter letter.sav
  • 2. ?????????????????????????? c ??????? directory
    ???? archives
  • cp .c archives
  • 3. ????????????? memo??? directory ????
    /home/seree ????? directory ????????
  • cp /home/seree/memo .
  • 4.????????????? memo ??? letter ????? directory
    ???? /home/jenny
  • cp memo letter /home/jenney

28
?????? mkdir
  • ?????????????? directory
  • ??????
  • mkdir directory_name
    directory_name
  • ????????
  • mkdir tutor

29
?????? rmdir
  • ??????????? directory ??? directory
    ????????????????? directory ????
    ????????????????????????????????
  • ??????
  • rmdir directory_name
    directory_name
  • ????????
  • rmdir xyz

30
?????? rm
  • ????????????????????? ??????????????????????????
    ????????
  • ??????
  • rm -i filename filename ...
  • ????????
  • rm data.txt
  • rm -i report.txtt

31
?????? mv
  • ??????????????????????? ????????????????????????
    ??????????
  • ??????
  • mv filename filename
  • mv filename filename
    directory
  • ????????
  • mv data.txt demo.txt
  • mv report.txt units

32
?????? w
  • ??????w??????????????????????????????????????
    ???? ????????????????????????????
  • ?????? w???????? user-account
  • ????????
  • bucc w
  • 1030 am up 6 days, 1645, 3 users, load
    average 1.30 1.31 2.00
  • User tty login_at_ idle
    JCPU PCPU what
  • u3510011 pts/11 622am 1
    735 26 w

33
?????? who
  • ????????????????????????????????????
    ??????????????????????????
  • ??????
  • who am I
  • ????????
  • who
  • jenny tty01 Jul 25 1101
  • alex tty11 Jul 25 1811

34
?????? finger
  • ?????? finger ?????????????????
    ???????????????? ???? ??????????????????????????
  • ?????? finger user-account _at_hostname...
  • ????????
  • 1. ??????????????????????????
  • finger
  • Login Name TTY
    Idle When Where
  • u3420245 Nongluck Chutratane pts/18
    Mon 08.24 CS2.au.ac.th
  • u3710855 Suhaalaj Barua pts/39
    1 Mon 0923 CS1.au.ac.th

35
?????? finger (???)
  • finger _at_nontri.ku.ac.th
  • nontri.ku.ac.jp
  • User RealName What Idle
    TTYHost Console Location
  • dahlan dehlan Phan pine 053 co
    wine hn HIRQakl Nishin
    -csh 113 p3 fizz
    (cxsf0.0)
  • kazuo KazuoSatou pino 033 p1
    fizz (0.0)
  • mleno Tsutomu Mleno pine 029 p4
    beer allbus.o)

36
?????? pwd
  • ????????????????????????????????????????
  • ?????? pwd
  • ????????
  • pwd

37
?????? cat
  • ????????????????? content ???????
    ???????????????????????????
  • ??????
  • cat options file-list
  • ????????
  • cat list.txt
  • cat -n list.txt

38
?????? more
  • ????????????????? content ???????
    ???????????????? ?????????????????????????????????
    ??? ?????? ???? space bar ????????????????????????
    ??????????????? enter
  • ??????
  • more filename filename
  • ????????
  • more list.txt

39
Permission
  • ?????????????????????? directory ?????????????
    ????????
  • - Read Permission ?????????????? ????????????
    r
  • - Write Permission ???????????????????
    ???????????? w
  • - Execute Permission ?????????? run
    ???????????? x
  • ?????????????? Permission ??????????? directory
    ?????????????????? ls -l

40
???????????????????????????????????????? DOS ???
Unix
  • ????????????????? ?? DOS ??
    Unix
  • ???????????? del rm
  • ????????????????????? ren
    mv
  • ????????????????????? dir Is
  • ??????? directory cd
    cd
  • ????? directory md
    mkdir
  • ???????????????? copy cp
  • ??????????????? -
    passwd

41
??????????????????????????????
  • ?????? write ?????????????????????????????????????
    ??? ?????????Host
  • ?????????????? ???????????????????????????
    ??????????????????? ????? ???
  • ??????
  • write destination-user
  • ????????
  • write u3615022
  • Hello khun toy? How are you going?
  • ?? Ctrl - d

42
?????? wall(write all)
  • ??????????????????????????????????????????????????
    ???????????? login ???? ??????????? host
    ????????
  • ??????
  • wall

43
?????? mail
  • ????????????????????????????????????????
  • ??????
  • mailx username_at_hostname
  • ????????
  • mailx seree_at_bucc.buu.ac.th
  • subject lt---------??????????????
  • ????????????????????????
  • ????? . (???)

44
?????? talk
  • ??????????????????????????????????????????? login
    ???? ??????????? host ???????????????? host
    ??????
  • ??????
  • talk username_at_hostname
  • ?????? talk username_at_hostname
  • username????????????????????? login
  • hostname ?????????????????????????????

45
?????? talk(???)
  • ?????? talk username_at_hostname
  • ????????????????????????????
    message????????????? ???????????????????????
  • username?????????????
  • hostname ?????????????????????????????
  • ??????????????????????????????????? ctrl - c
Write a Comment
User Comments (0)
About PowerShow.com