Введение в команды unix

Download Введение в команды  UNIX

If you can't read please download the document

Upload: libra

Post on 08-Jan-2016

51 views

Category:

Documents


0 download

DESCRIPTION

Введение в команды UNIX. UNIX Shell. UNIX Shell - командный интерпретатор, используемый в операционных системах семейства UNIX, посредник между пользователем и операционной системой. - PowerPoint PPT Presentation

TRANSCRIPT

  • UNIX

  • UNIX ShellUNIX Shell - , UNIX, . , , .

  • POSIXPOSIX (ISO/IEC 9945) (Portable Operating System Interface for Unix - Unix) , . POSIX .

  • POSIX 3. , ( , ), (if, case, ||, &&) (for, for in, while, until) , . , (vi).

  • UNIX ShellsBourne shell compatiblesh, ash, bash, dash, ksh, zshC shell compatiblecsh, tcshExotices (functional), psh (Perl), pysh (Python)

  • Bourne Shell Bell Labs 7- UNIX (UNIX Version 7, 1977). ALGOL 68

    "Nobody really knows what the Bourne shell's grammar is. Even examination of the source code is little help." Tom Duff

  • C Shell ( ) 1970 C. sh

  • Korn Shell 1980. Bourne shell C shell.

    The POSIX standard specifies its standard shell as a strict subset of the Korn shell

  • Bourne Again Shell (bash) GNU sh 1989 . csh ksh.

    shell Linux MacOS

  • Bash features $RANDOM $PPID

  • echo - ( stdout)printf - , echoread - (stdin),

  • Hello World!echo Hello World!

    printf "%s\n" "Hello World"

  • :$ echo -e "a\n"a

    -h, --help -? ( )

    : ls -ltra

  • help COMMAND COMMANDman COMMAND COMMANDinfo COMMAND

  • d pwd mkdir rm cp touch ls

  • more, lesshead, tailwcsortteefindlocategrep

  • Tab Tab

  • 0 (stdin) . >grep 'apt' < a 1 (stdout) - >ls > a.txtgrep 'apt' < a > b 2 (stderr) - 2>ping -c 5 google.com > result.txt 2> error.txt

  • > - >> -

  • (pipe) . . : |.

    cat filename | grep something

  • HotkeysCtrl-C - SIGINT, .Ctrl-D - (EOF).Ctrl-Z - SIGTSTP, .

  • , - .txt. cal. , . ip.txt IP . res.txt, err.txt. , , r. , .