&dD Unix&d@ ( 1.17. 1998) (C) Copyright , 1993-1998 ================ =============================== , . 956-2155, 274-6329, 938-1902 moshkow@ipsun.ras.ru mailto:moshkow@ipsun.ras.ru http://www.ras.ru/~moshkow/ http://www.ras.ru/~moshkow/ . &dD UNIX&d@ &dD&d@ () Unix- () () () Unix () VI () Unix () find, grep () cpio, tar () , init () Unix () () , () Swaping () () : () Unix (telnet, ftp, mailx...) () Hardware : Ethernet, Token ring, FDDI () Hardware () TCP/IP () () TCP/IP () TCP/IP () NFS () NFS: - () DNS () UUCP () LP () Unix - X Windows () &dD&d@ VI () X Windows () SVR4 () DNS. standalone () Unix () () HTTPD, HTML () () Unix, () . &dD Unix-&d@ ( ) , . . , , Console login: - : Login: login . , login' root - "" - . Console login: root &dDSUN: &d@ Sun SPARCstation boot-prom. STOP+A. (STOP - ). boot-prom prompt Ok: Ok _ boot-. , : go - , help boot [] - eject - "" - CD-ROM probe-scsi - SCSI- ( "GO" . .) "" Sun - , - . - A B. Sun, , , , ( ). boot- , BREAK ( vt220 BREAK - F5). - Sun- - BREAK, Sun boot-. Sun-, . : rs232c.txt#5 - TTY- "CONSULT-ZSBRK", BREAK. &dDHP 9000: &d@ HP 9000 boot-prom PDC (Processor Depended code). - , . ESCAPE, - Ctrl-K ( Break, -) PDC-prompt BOOT-ADMIN> boot-. , : help search - SCSI- boot [] - secure on - ( secure off, ) "" , - . . . &dD &d@ , "root" - . . . . su # Super User Unix . : , , , , , , . - , . Comment Familiq Imya Otchestwo logname passwd ( ) UID User Identification Descriptor GID Group Identification Descriptor $HOME shell &dD &d@: /usr/local/bin/bash /bin/ksh , /usr/local/bin/tcsh , "" /bin/sh "" /bin/csh "" /etc/passwd - . /etc/shadow - . . Unix. Unix "" ( sysadm) - , . . "" root. "sysadm" , . : vt100 . -: admintool Solaris 2 adminsuite Solaris 2.7 sysadmsh SCO UNIX 4 scoadmin SCO OpenServer 5 smit, msmit AIX sam HP-UX control-panel Linux RedHat sysadm UnixWare, ISC, SVR4 &dD &d@. adduser Linux useradd SunOS 4.1 vipw BSD/OS, FreeBSD &dD ""&d@. 1. /etc/passwd : moshkow:x:555:1:Maksim E. Moshkow:/home/moshkow:/bin/ksh 2. /etc/shadow pwconv 3. mkdir /home/moshkow chown moshkow /home/moshkow 4. passwd moshkow 5. . . &dD &d@ &dD &d@ login: , , , . , CTRL+U, DEL, CTRL-D ( ), Return, . . sunsite:~/$ _ , exit Ctrl-D . &dD &d@. . , env. env # LOGNAME=moshkow # HOME=/home/moshkow # SHELL=/bin/ksh # MAIL=/usr/mail/moshkow # , # PS1=host1:$PWD/$ # PATH=:/usr/local/bin:/bin:/usr/bin:/usr/X11/bin:/usr/informix/bin: # , TERM=vt100 # , # , : Imya_Pereemennoj=znachenie export Imya_Pereemennoj abc=Kalosha export abc echo : echo $abc &dD &d@ /etc/profile ".profile" ( ) - . env ##### .profile ################################## # PATH=:$HOME/bin:$PATH:/usr/sbin:/usr/local/bin:/usr/informix/bin # ksh EDITOR=emacs export PATH EDITOR LC_CTYPE=iso_8859_1 export LC_CTYPE # - "" # # =BackSpace =Ctrl-U # =Ctrl-C "_"=Ctrl-| stty erase "^h" echoe kill "^u" quit "^|" intr "^c" stty cs8 -parenb -istrip # 8- , noparity, 8- # case "$0" in # *ksh) # Korn Shell # alias __A=`echo "\020"` # ^P = 020 alias __B=`echo "\016"` # ^N alias __C=`echo "\006"` # ^F alias __D=`echo "\002"` # ^B # pwd PS1=$LOGNAME@`uname -n`:'$PWD/$ ' export PS1 ;; *bash) # bash' host:pwd PS1='\h:\w/\$ ' export PS1 ulimit -Sc 0 # core ;; *sh) # posix-shell HP-UX PATH=$PATH:/usr/sbin PS1=$LOGNAME@`uname -n`:'$PWD/$ ' HISTFILE=$HOME/.sh_history ENV=$HOME/.kshrc export PATH ENV HISTFILE PS1 # .kshrc set -o emacs ;; esac # : _'_ # - _`_ - , . &dD &d@ Korn-Shell /bin/ksh, EDITOR=emacs, Ctrl-: ^P / ^N PREVIOUS / NEXT ^F / ^B FORWARD / BACK ^A / ^E / ^D / ^K / ^Y ^R ESC ESC ESC = bash, TAB &dD &d@ , , root , cd / shutdown -y -g0 -i0 . shutdown -y -g0 -i6 sysadm. Unix ( , BSD, SunOS, Linux, HP-UX) shutdown . : shutdown -y -h now # shutdown -y -r 60 # 60 . &dD Unix ( )&d@ 1.1. Unix , . 1.2. - , . Unix . Unix unerase, . Unix . . 1.3. "/". ( , MSDOS Unix , "\" - - .) - , . . 256 . 1024 . 1.4. "*" ( ) "?" ( ). "." , ".." - ( ). 1.5. , , , . - , . . ( ) "-". - - ... ... 1.6. &, (). , . , . - ... & 1.7. - - , . , . . , , , : > _ ( ), < _ ( ), 2> _ ( - ). - : ls > infdir , ( , ), . , >> 2>> 1.8. Unix , . 1.9. , . TERM=vt220 HOME=/home/moshkow PATH=:/bin/:dss/rk:/home/moshkow/bin 1.8. . "|" - . : /tmp, "text" ... cat /tmp/text* | wc -c # cat /tmp/text*, # wc -c -l # . : ps -ef | more : ps -ef > temp-file more temp-file rm temp-file &dD2. &d@. pwd - cd - ls - cat - - cp - mv - () ln - rm - rmdir - mkdir - echo - ps - kill - "" man - &dD2.1 pwd &d@. pwd &dD2.2 cd &d@. cd [ ] cd /usr/spool/lp/adm cd .. , "" $HOME &dD2.3 ls &d@. : ls [] [] - ; , - . . ls . ls -al - : () -rwxr-xr-x 1 moshkow sys 17 Oct 18 16:13 ../jean drwxr-xr-x 1 moshkow sys 12 Oct 18 16:11 ../jelly -rwxr-xr-x 1 moshkow sys 0 Oct 13 14:14 ../j.bu.txt ^^ ^ ^ || | | || | +----- "" || +-------- |+----------- "" +------------ "-" - , "d" - : r - , w - , x - , - - . -a - ( ); -x - 4 ; -t - , -R - ls -CF - ls -al - &dD2.4 cat &d@. : cat 1 [2... ] Cat . : cat , cat 1 2 > 3 . 1 2, cat 1 >> 2 &dD2.5 more, pg &d@. more file_name ... pg file_name ... less file_name ... , . . "less", "" - "pg" q - - ENTER - b - / - h - Help - more,less,pg , "" , " " ls -al | more - ps -e | pg - &dD2.6 cp &d@. : cp 1 2 cp 1 [2 ...] 1, ... , . - , 1 . . , , , . &dD2.7 mv () &d@. : mv 1 2 mv 1 [2 ...] cp, . - ). : mv /dss/*/rk_*.help /dss/delo &dD2.8 ln &d@. : ln 1 2 # "" ln -s 1 2 # "" 1 . 1 2 . " " ( "-s"), file1 . "2" . &dD2.9 rm &d@. : rm [-fri] ... -i - -r - -f - , rmdir ... , rm -r : , ".*" ".." # rm -r .* ( unix' , - SCO ) &dD2.10 mkdir &d@. mkdir. : mkdir _ ... &dD2.11 chmod &d@. chmod ( ) . : chmod u+x file1 chmod a+w file1 &dD2.12 echo &d@. echo echo "\017" Ctrl-O, 017 . vt220 at386 &dD2.13 &d@. : touch primer # primer; cat > primer # primer # . # CTRL+D. &dD2.14 ps &d@. , . ps - ps -ef - , "" ( SYSV Unix) ps -ax - , "" ( BSD* Linux) &dD2.15 kill &d@. kill . 1078 ( ps -e) kill -9 1078 , , CTRL-C, CTRL-\ &dD2.16 man , &d@. , . : man ___ man -k _ # , ... &dD2.17 who &d@. who - , who am i finger last | more id man -k who - , , . . &dD "VI"&d@ "" () Unix ( - ) . , . "" - VI. &dD VI :&d@ 1. - . . 2. - . 3. ED ( , ..) . ? . . : vi _ VI . , : ESC : q ! Enter , , : ESC : w ! Enter ESC : q Enter , : ESC : wq Enter &dD :&d@ "i" "A" "cw" ESC CTRL-[ ":" ( ED) &dD :&d@ h,j,k,l , , , Ctrl-F Ctrl-B , . , . (. " , terminfo, termcap"). terminfo.txt i ESC , x dd &dD :&d@ o ( ) a 5yy 5 p P J / Enter - n VI . , , VI , - " VI", , , ( ), . vibegin.txt EMACS, , , . . &dD Unix' ?&d@ &dD &d@ Unix - "", "" Unix - Unix System Laboratory - . - - Unix'. System III System 6 USL <-- --> Berkeley System 7 BSD 4.0 Unix V 3.1 Unix V 3.2 <------- BSD 4.2 / BSD 4.3 System V Release 4 / / BSD 4.4 SVR4.0 < < ____________________________________ SVR4.1 SVR4.2 USL "" BSD AT&T, BSD. BSD- - Sun/SunOs SVR4. , SVR4 , , Unix V BSD. DEC: OSF/1 Alpha AXP - , BSD 4.3. &dDUnix' IBM/PC&d@ &dD &d@ BSD/OS 2.0 BSDi/386 . . SCO Unix 386bsd BSD 4.3 NetBSD 386bsd FreeBSD 2.1 . USL, , AT&T. Linux 2.0.30 Unix'. 100 . 1 . , , , , -. hardware. iBCS, SCO, , Oracle Informix. Linux Netware Samba. MS Windows WABI . &dD Unix'&d@ UnixWare 2.1 SVR4.2 SCO. Windows Netware. . PC. Novell SCO, . Solaris 2.5 SVR4.0 SunSoft. Sun'. , . 5- Solaris Motif. SCO Unix 4.0 SVR3.2 Unix' PC. . hardware. PC. . . . . ISC Unix 3.2 . . &dDUnix', &d@ "" Sun 1,2,10,... SunOS 4.1.2 BSD 4.3 Sun 10,20,1000 SunOS 5.5 SVR4.0 IBM RS/6000 AIX SV 3.2 HP 9000 HP-UX 10 BSD 4.2 & SV 3.2 Sequent Dynix SV 4.0 Motorola 922 SVR4/88 SVR4.0 -88 Bestix SV 3.1 DEC Ultrix BSD 4.2 DEC Alpha AXP OSF/1 BSD 4.3 SGCS Silicon Graphic IRIX 6.0 , " " Unix. - HP-UX 10.20 AIX. - Solaris 2.5 (). . &dD GREP FIND&d@. grep/egrep "" - "" egrep [ file ... ] ( ), - , : . * ^ $ [ ] . - * - "" ( ) .* - ^ - $ - [] - , : egrep ':0:0:' /etc/passwd : egrep -v ':0:0:' /etc/passwd , a,b,e,d cat /etc/passwd | grep "^[abed].*" find. find , - . , - . find [ ... ] // - find: -name "*.c" - *.c -type f - -type d - -size +500 - 500*512 -mtime -3 - 3- -newer filename - , filename : find SHELL' . grep , . - find -print - -exec {} \; . - , 4 . find . -type f -mtime -4 -print *.bu, *%, - . find / \( -name "*.bu" -o -name "*%" \) -type f \ -atime +30 -exec rm {} \; "rm {} \;" - Unix, - . "{}" . - , . . &dD. &d@ Unix : tar , cpio , tar, . &dD tar (Tape Archiver)&d@. . : "-c" Create, "-x" eXtract, "-a" Append, "-t" tar -cvf arhiw.tar fajl1 fajl2 katalog3 ... - tar -tvf /dev/rmt/ctape tar -xvf arhiw.tar katalog3/fajl4 tar -xvf /dev/rmt/ctape tar -avf arhiw.tar fajl5 : "v" (Verbose) "f" &dD CPIO. (Copy In/Out)&d@. cpio -o , . : -o - (output) . -H odc - " " ( - Besta Sun) -c - "" cat spisok | cpio -ovB -H odc > /dev/rmt/ctape1 find katalog -print | cpio -ovc > arhiwnyj-fajl.cpio cpio -i cpio- - # . cpio -itB < /dev/rmt/ctape # . cpio -idmvB ["" ...] < /dev/rmt/ctape -B 5120 - . -d . -v . -m . -f , . -u . -l , , . &dD &d@. tar cpio, DOS- , . , - compress gzip. compress , - "" . zcat (" cat":-) "- " , "" . tar-: tar -cvf - emacs-19.28 | compress > emacs-19.28.tar.Z tar-: zcat < emacs-19.28.tar.Z | tar -tvf - "-" , tar . " " ( - ). GNU Zip - , , compress, arj pkzip. - cpio , "" gzip. find . -print | cpio -ovcaB | gzip > arhiw.gz cpio- gunzip < arhiw.gz | cpio -idmv &dD mt - &d@ . , . , , : man mt SCO Unix "tape" &dD &d@ Unix . backup/restore dump fbackup/frestore (HP/UX) pax . . . . &dD &d@ &dD * Boot- * &d@ Boot, bootstrapping - , "/, ", "Pull itself up by its own boot straps" ( ) Boot-prom'a - , . , boot-prom : , , hardwa