* [?????????????](#?????????????) * [????](#????) * [???](#???) * [??????](#??????) * [?????](#?????) * [PATH](#path) * [?????](#?????) * [sudo](#sudo) * [GNU](#gnu) * [????????](#????????) * [???????ѷ](#???????ѷ) * [????](#????) * [??????????](#??????????) * [??????](#??????) * [1. MBR](#1-mbr) * [2. GPT](#2-gpt) * [??????????](#??????????) * [1. BIOS](#1-bios) * [2. UEFI](#2-uefi) * [????](#????) * [??????????????](#??????????????) * [?????????](#?????????) * [?????????????????](#?????????????????) * [1. ?????????????](#1-?????????????) * [2. ???????????](#2-???????????) * [3. ??????](#3-??????) * [???????](#???????) * [?????????](#?????????) * [??????](#??????) * [???????](#???????) * [??????](#??????) * [????????????????](#????????????????) * [1. ls](#1-ls) * [2. cp](#2-cp) * [3. rm](#3-rm) * [4. mv](#4-mv) * [??????????](#??????????) * [1. cat](#1-cat) * [2. tac](#2-tac) * [3. more](#3-more) * [4. less](#4-less) * [5. head](#5-head) * [6. tail](#6-tail) * [7. od](#7-od) * [8. touch](#8-touch) * [????????????](#????????????) * [1. which](#1-which) * [2. whereis](#2-whereis) * [3. locate](#3-locate) * [4. find](#4-find) * [4.1 ???????????](#41-???????????) * [4.2 ????????????????????????](#42-????????????????????????) * [4.3 ???????????????????](#43-???????????????????) * [???????????](#???????????) * [??????????](#??????????) * [inode](#inode) * [???? inode ?? block](#????-inode-??-block) * [????????????????](#????????????????) * [1. ???????](#1-???????) * [2. ????????](#2-????????) * [???????](#???????) * [???](#???) * [1. gzip](#1-gzip) * [2. bzip2](#2-bzip2) * [3. xz](#3-xz) * [???](#???) * [BASH](#bash) * [Bash????](#bash????) * [????????](#????????) * [??????????](#??????????) * [???????????](#???????????) * [???????](#???????) * [1. ??????cut](#1-??????cut) * [2. ????????sort??uniq](#2-????????sort??uniq) * [3. ???????????tee](#3-???????????tee) * [4. ?????????tr??col??expand??join??paste](#4-?????????tr??col??expand??join??paste) * [5. ???????split](#5-???????split) * [??????????????????????](#??????????????????????) * [grep](#grep) * [printf](#printf) * [awk](#awk) * [vim ??????](#vim-??????) * [??????](#??????) # ????????????? ## ???? **1. --help** ?????????????????? **2. man** man ?? manual ??????????????????????????? ????? man date ????? DATE(1) ?????????????????????????????????????????????? | ???? | ???? | | -- | -- | | 1 | ????? shell ?????????????????????????? | | 5 | ??????? | | 8 | ????????????????????? | **3. info** info ?? man ????????? info ???????????????????????????????? ## ??? **1. ???????????? sync** ????????????????????????????????????????????????????????????????????? sync ????????? **2. shutdown** ```html # /sbin/shutdown [-krhc] [???] [??????] -k ?? ??????????????????????????????????? -r ?? ??????????????????????? -h ?? ?????????????????????? -c ?? ??????????? shutdown ??????? ``` **3. ??????????** reboot??halt??poweroff?? ## ?????? ps ?? ????? theadx ?????????? ```html ps aux | grep threadx ``` ## ????? netstat ?? ???????? 80 ??????? ```html netstat -anp | grep 80 ``` ## PATH ????????????? PATH ??????????????????????????? : ????? ```html /usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/dmtsai/.local/bin:/home/dmtsai/bin ``` ## ????? 0??????? 1????????????????????root???? 2?????????????????? 3?????????????????????????????????????????? 4??????????? 5???????????? X-windows ?????????????? 6???????????????????? ## sudo ??? sudo ????????????? root ????????????????? /etc/sudoers ?????????? ## GNU GNU ?????????????????????????????????????????????????? GNU???????????????? GPL ????????????? GPL ???? GNU ???????????????????????? - ???????????????????? - ??????????? - ?????????????????????????? ## ???????? RPM ?? DPKG ???????????????????????RPM ???? Redhat Package Manager???????? Red Hat ????????????? GNU ???????????????????? Linux ?? (RHEL) ?????????????? RPM ????????????? Debian ?????? (UBUNTU) ?? DEB ???????????? DPKG?????? Debian Package??????????? RPM ????? YUM ???? RPM ?????????????????????????????????????????????????? RPM ???????????????????????????????????????????????????????????????????????????????????????????????????YUM ??????????????????????????????????? ## ???????ѷ Linux ?????????????? Linux ???????????????? **???? DPKG** ??????? - Ubuntu ???????? - Debian **???? RPM** ??????? - Red Hat ???????? - Fedora - CentOS # ???? ## ?????????? Linux ???????????????????????? ???????????????? - SCSI/SATA/USB ?????/dev/sd[a-p] - IDE ?????/dev/hd[a-d] ?????????????????????????????????????????????????????????? ## ?????? ?????????????????????????????????? MBR ???????????????????????? GPT ?????? ### 1. MBR MBR ????????????????????????????????????Master boot record, MBR??????????partition table???????? MBR ? 446 bytes??partition table ? 64 bytes?? ????????? 64 bytes???????? 4 ?????????? 4 ???????????????Primary?????????????Extended????????????????????????????????????????????????????????????????????????????????????????????????????????????? Linux ???????????????????????????????????????????+???????? /dev/sda1????????????????? 5 ????? ### 2. GPT ????????????????????????? 512bytes ?????????? 4k??GPT ??????????????????????????????????????Logical Block Address, LBA???? GPT ?? 1 ?????????? MBR?????????? 33 ????????????????????????? 33 ???????????????????????? GPT ????????????????????????????????? 128 ???????? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/a5c25452-6fa5-49e7-9322-823077442775.jpg) ## ?????????? ### 1. BIOS BIOS ??????????????????????????????????????????????????????????????????? MBR???? MBR ??????????????????????????????????????????????????? MBR ?????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? MBR ???????????????????????????????????????????????????????????????????????????????? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/f900f266-a323-42b2-bc43-218fdb8811a8.jpg) ???????????????????? Windows ???? Linux???????? Windows ?????? MBR???? Linux ???????????????????? MBR ??????????????????????????????????????????????????? ### 2. UEFI UEFI ????? BIOS ???????????????????? ## ???? ????????????????????????????????????????????????????????? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/249f3bb1-feee-4805-a259-a72699d638ca.jpg) # ?????????????? ## ????????? ???????????????????????????????????????????????????????? ??? ls ????????????????????????????????? drwxr-xr-x. 3 root root 17 May 6 00:14 .config???????????????????? - drwxr-xr-x?????????????????? 1 ????????????? 9 ?????????? - 3?????????? - root??????????? - root???????? - 17????????? - May 6 00:14??????????????? - .config????????? ??????????????????? - d?????? - -??????? - l??????????? 9 ?????????????? 3 ??????? 3 ???????????????????????????????????????????????????? 3 ???? r??w??x ????????????????????? ## ????????????????? ### 1. ????????????? ```html # chgrp [-R] groupname dirname/filename -R???????? ``` ### 2. ??????????? ????????????????????????????????????? ```html # chown [-R] ?????:????? dirname/filename ``` ### 3. ?????? ?????????????????????????????????? 3 ????????????????????????????????? 4??2??1????????????????????? r??4??w??2??x??1?? ```html # chmod [-R] xyz dirname/filename ``` ???????? .bashrc ???????????? -rwxr-xr--?? ```html # chmod 754 .bashrc ``` ?????????????څ???? ```html # chmod [ugoa] [+-=] [rwx] dirname/filename - u??????? - g????????? - o???????? - a???????? - +???????? - -???????? - =???څ??? ``` ??????? .bashrc ??????????????????? ```html # chmod a+w .bashrc ``` ## ??????? ?????????????????????????????????????????????????????????? w ?????????????????????? ???????????????????????????????????????????? r ????????????????w ????????????????????????????????????????????????????????x ??????????????????????x ????? r ?? w ?????????????????????????????????????????????????????????????????? ## ????????? ?????????????????????????????? 666 ??????? -rw-rw-rw- ?? ????????????????????????????????????????????? 777 ??????? drwxrwxrwx?? ??????? umask ???????????????????????????????????????????? 002 ??????????????????????? 2 ??????????????????????????????????? -rw-rw-r-- ?? ## ?????? ??????? Linux ???ѷ????????????????Filesystem Hierarchy Standard (FHS) ??? Linux ?????????????????????????? - / (root, ????) - /usr (unix software resource)???????????????????????????? - /var (variable)????????????????????????????? ??????????????? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/27ace615-558f-4dfb-8ad4-7ac769c10118.jpg) # ??????? ## ?????? 1. modification time (mtime)???????????????????? 2. status time (ctime)?????????????????????????????? 3. access time (atime)???????????????? ## ???????????????? ### 1. ls ?????????????????????????????????????????? ```html # ls [-aAdfFhilnrRSt] file|dir -a ???????????? -d ???????????? -l ???????????????????????????????????????? ``` ### 2. cp ????????? ?????????????????????????????????????? ```html cp [-adfilprsu] source destination -a ?????? -dr --preserve=all ??????????? dr ?????????? -d ????????????????????????????????????????????? -i ????????????????????????????????? -p ????????????????????? -r ???????????? -u ??destination ?? source ?????? destination???? destination ???????????????? --preserve=all ?????? -p ??????????????????? SELinux ??????, links, xattr ????????? ``` ### 3. rm ????????? ```html # rm [-fir] ??????? -r ???????? ``` ### 4. mv ????????? ```html # mv [-fiu] source destination # mv [options] source1 source2 source3 .... directory -f ?? force ???????????????????????????????????????? ``` ## ?????????? ### 1. cat ??????????? ```html # cat [-AbEnTv] filename -n ?????????? ?????????????????? -b ?????? ``` ### 2. tac ?? cat ???????????????????????? ### 3. more ???????????????????????????????? ### 4. less ?? more ????? ### 5. head ??????????????? ```html # head [-n number] filename -n ?????????????????????????? ``` ### 6. tail ?? head ????????????????????? ### 7. od ?????????????????????????????????????? ### 8. touch ?????????????????????? ```html # touch [-acdmt] filename -a ?? ???? atime -c ?? ???? ctime????????????????????????? -m ?? ???? mtime -d ?? ????????????????????????????????????????? --date="????????" -t ????????????????????????????????????[YYYYMMDDhhmm] ``` ## ???????????? ### 1. which ????????? ```html # which [-a] command -a ??????????????????????????? ``` ### 2. whereis whereis ?????????????????????????????????????? ```html # whereis [-bmsu] dirname/filename ``` ### 3. locate locate ????????????????????????????? locate ??? /var/lib/mlocate/ ???????????????????????????????????????????????????? locate ????????????????????? updatedb ??????????????? ```html # locate [-ir] keyword -r??????????? ``` ### 4. find find ????????????????????????????? ```html # find filename [option] ``` #### 4.1 ??????????? ```html -mtime n ?????? n ?????????????????????? -mtime +n ?????? n ????(???? n ????)???????????? -mtime -n ?????? n ?????(?? n ????)???????????? -newer file ?? ???? file ???????? ``` +4??4 ?? -4 ?????????????? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/658fc5e7-79c0-4247-9445-d69bf194c539.png) #### 4.2 ???????????????????????? ```html -uid n -gid n -user name -group name -nouser ???????????????? /etc/passwd ????? -nogroup?????????????????? /etc/group ????? ``` #### 4.3 ??????????????????? ```html -name filename -size [+-]SIZE??????? SIZE ?????(+)??(-)?????????? SIZE ??????c: ???? byte??k: ???? 1024bytes??????????? 50KB??????????????? -size +50k -type TYPE -perm mode ???????????? mode ????? -perm -mode ???????????? mode ????? -perm /mode ??????????????? mode ????? ``` # ??????????? ## ?????????? ??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????? ??????????????????? 1. superblock????????????????????????? inode ?? block ????????????????????????????????????????????? 2. inode?????????????? inode???????????????????????????????????? block ???? 3. block????????????????????????????????? block?? ????????????????????????? inode ??????????????????????? block?????????? block ????????????? ????????????????????????? block ???????? Ext2 ???????????????????????????????????? block ????????????????????????????? block ????????? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/1974a836-aa6b-4fb8-bce1-6eb11969284a.jpg) ## inode Ext2 ????????? block ???? 1k??2k ?? 4k ?????????? block ??????????????????????? inode ??????? 128 bytes?? inode ????????????????? block????????? block ????????????????????????? block??????? inode ?????????????????????? block?????????????????????????????????? block ???????????????? block ?????????????? block?? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/89091427-7b2b-4923-aff6-44681319a8aa.jpg) inode ???????????????? - ???????????(read/write/excute)?? - ?????????????????(owner/group)?? - ????????????? - ????????????????????(ctime)?? - ???????????(atime)?? - ??????????(mtime)?? - ???????????????(flag)???? SetUID...?? - ????????????????? (pointer)?? ## ???? inode ?? block ???????????????????? inode ????????? block??block ???????????????????????? inode ????????????????????????? inode ????????????????????????????????????????????????????????????????????? w ?????? ## ???????????????? ```html # ln [-sf] source_filename dist_filename -s ??????? hard link???? -s ? symbolic link -f ????????5????????????????????? ``` ### 1. ??????? hard link ?????????????????????????????????????????????? inode ?????????????????????????????????????????? 0?? ????????????????? Filesystem?????????????????? ```html # ln /etc/crontab . # ll -i /etc/crontab crontab 34474855 -rw-r--r--. 2 root root 451 Jun 10 2014 crontab 34474855 -rw-r--r--. 2 root root 451 Jun 10 2014 /etc/crontab ``` ### 2. ???????? symbolic link ???????? Windows ???????????????????????????????????????????????????????????????????????????????????????? symbolic link ???????????????? ```html # ll -i /etc/crontab /root/crontab2 34474855 -rw-r--r--. 2 root root 451 Jun 10 2014 /etc/crontab 53745909 lrwxrwxrwx. 1 root root 12 Jun 23 22:31 /root/crontab2 -> /etc/crontab ``` # ??????? ## ??? Linux ????????????????????????????????? | ????? | ??????? | | -- | -- | | \*.Z | compress | |\*.zip | zip | |\*.gz | gzip| |\*.bz2 | bzip2 | |\*.xz | xz | |\*.tar | tar ????????????????????? | |\*.tar.gz | tar ????????????????? gzip ????? | |\*.tar.bz2 | tar ????????????????? bzip2 ????? | |\*.tar.xz | tar ????????????????? xz ????? | ### 1. gzip gzip ?? Linux ?????????????????? compress??zip ?? gzip ???????????? ???? gzip ????????????????????? ?? 9 ???????????????????? ??????? zcat??zmore??zless ?????????????????? ```html $ gzip [-cdtv#] filename -c ??????????????????????? -d ??????? -t ?????????????????? -v ?????????????? -# ?? # ???????????????????????????????????????????6 ``` ### 2. bzip2 ???? gzip ??????????? ??????bzcat??bzmore??bzless??bzgrep?? ```html $ bzip2 [-cdkzv#] filename -k ?????????? ``` ### 3. xz ???? bzip2 ??????????? ?????????gzip??bzip2??xz ?????????????????????????????????????????????? ??????xzcat??xzmore??xzless??xzgrep?? ```html $ xz [-dtlkc#] filename ``` ## ??? ????????????????????????????????????????????????????????tar ???????????????????????? gip??bzip2??xz ????????????????? ```html $ tar [-z|-j|-J] [cv] [-f ?????tar???] filename... ==?????? $ tar [-z|-j|-J] [tv] [-f ????tar???] ==?? $ tar [-z|-j|-J] [xv] [-f ????tar???] [-C ??] ==????? -z ?????zip?? -j ?????bzip2?? -J ?????xz?? -c ????????????? -t ??????????????????????? -x ?????????????????? -v ???????/?????????????????????????????? -f : filename????????????? -C ?? ?? ?????????????? ``` ???????????? ?????? ?? tar -jcv -f filename.tar.bz2 ??????????????????? ?? ??       ?? tar -jtv -f filename.tar.bz2 ?????     ??tar -jxv -f filename.tar.bz2 -C ?????????? # BASH ??????? shell ?????????????Bash ???? shell ?????? ## Bash???? **1. ???????** ??????????????????????????????????????? \~/.bash_history ????????????????????????? **2. ????????????** ??????tab **3. ????????** ???? lm ?? ls -al ??????? **4. shell scripts** **5. ????** ???? ls -l /usr/bin/X\* ?? /usr/bin ?????????? X ?????????? ## ???????? ?????????????????? = ??????????????????????? \$ ????????? \${} ????????????????? echo ??? ```bash $ var=abc $ echo $var $ echo ${var} ``` ????????????????????????????????????????????????????????????????????var="lang is \$LANG"????var???? lang is zh_TW.UTF-8??????????????????????????????????????? var='lang is \$LANG'???? var ???? lang is \$LANG?? ??????? \`???\` ???? \$(???) ????????????????????????????? version=\$(uname -r)???? version ???? 3.10.0-229.el7.x86_64?? ??????? export ??????????????????????????????????????????????????????????????? Bash ?????????? Bash?? Bash ??????????????????????????????????????????????????????????????????????????????????????????? declare ???? ```html $ declare [-aixr] variable -a ?? ????????????? -i ?? ????????????? -x ?? ????????????? -r ?? ?????readonly???? ``` ??? [ ] ??????????????? ```bash $ array[1]=a $ array[2]=b $ echo ${array[1]} ``` ## ?????????? 1. ??????????????????????? /bin/ls ???? ./ls ?? 2. ?????????????????? 3. ?? Bash ????????????? 4. ?? \$PATH ???????????????????????????????????? ## ??????????? ??????????????????????????????????????????? 1. ??????? (stdin)      ??????? 0 ????? < ?? << ?? 2. ?????? (stdout)    ??????? 1 ????? > ?? >> ?? 3. ??????????(stderr)??????? 2 ????? 2> ?? 2>> ?? ???????????????????????????????????????????????????????? ??????????????????????????????????? /dev/null ??????????????? ??????????????????????????????????????????????????????????????????????? 2>&1 ??????????????????????????? ```bash $ find /home -name .bashrc > list 2>&1 ``` ## ??????? ?????????????????????????????????????????????????????????????????????????????????????????????????????????? | ?????????????? ```bash $ ls -al /etc | less ``` ### 1. ??????cut ???????????????? cut ???????????????????????? ```html $ cut -d ??????? -f ?????? -d ???????? -f n ????? n ?????? -c ????????????????? ``` ????1??last ???????????????????????????????? ```html $ last root pts/1 192.168.201.101 Sat Feb 7 12:35 still logged in root pts/1 192.168.201.101 Fri Feb 6 12:13 - 18:46 (06:33) root pts/1 192.168.201.254 Thu Feb 5 22:37 - 23:53 (01:16) $ last | cut -d ' ' -f 1 ``` ????2???? export ????????????? 12 ?????????????????? ```html $ export declare -x HISTCONTROL="ignoredups" declare -x HISTSIZE="1000" declare -x HOME="/home/dmtsai" declare -x HOSTNAME="study.centos.vbird" .....(???????)..... $ export | cut -c 12 ``` ### 2. ????????sort??uniq **sort** ???????? ```html $ sort [-fbMnrtuk] [file or stdin] -f ??????? -b ?????????????? -M ????????????????????? JAN, DEC -n ????????? -r ?????????? -u ?????? unique ????????????????? -t ?????????????tab -k ?????????????? ``` ??????/etc/passwd ???????? : ????????????????????? ```html $ cat /etc/passwd | sort -t ':' -k 3 root:x:0:0:root:/root:/bin/bash dmtsai:x:1000:1000:dmtsai:/home/dmtsai:/bin/bash alex:x:1001:1002::/home/alex:/bin/bash arod:x:1002:1003::/home/arod:/bin/bash ``` **uniq** ????????????????????? ```html $ uniq [-ic] -i ??????? -c ???????? ``` ?????????????????????? ```html $ last | cut -d ' ' -f 1 | sort | uniq -c 1 6 (unknown 47 dmtsai 4 reboot 7 root 1 wtmp ``` ### 3. ???????????tee ???????????????????????????? **tee** ??????????????????????????????????????????????? tee ????????????????????????????? ```html $ tee [-a] file ``` ### 4. ?????????tr??col??expand??join??paste **tr** ??????????????????????????????I?? ```html $ tr [-ds] SET1 ... -d ?? ??????? SET1 ???????? ``` ???????? last ???????????????????? ```html $ last | tr '[a-z]' '[A-Z]' ``` **col** ?? tab ????????????? ```html $ col [-xb] -x ?? ?? tab ????????????? ``` **expand** ?? tab ??????????????????? 8 ???? ```html $ expand [-t] file -t ??tab ?????????? ``` **join** ??????????????????????? ```html $ join [-ti12] file1 file2 -t ???????????????? -i ???????????? -1 ???????????????????? -2 ???????????????????? ``` **paste** ???????????????? ```html $ paste [-d] file1 file2 -d ????????????? tab ``` ### 5. ???????split **split** ???????????????????? ```html $ split [-bl] file PREFIX -b ????????????????????????? b, k, m ?? -l ?????????????????? - PREFIX ?????????????????? ``` # ?????????????????????? ## grep ??????????????????????????? ```html $ grep [-acinv] [--color=auto] ???????? filename -a ?? ?? binary ????? text ?????????????? -c ?? ??????????? -i ?? ????? -n ?? ????? -v ?? ????????????????? ???????? ?????????? --color=auto ?????????????????? ``` ??????????? the ??????????????????????????? --color=auto ???????????????? Linux ?????????? the ??????? ```html $ grep -n 'the' regular_express.txt 8:I can't finish the test. 12:the symbol '*' is represented as start. 15:You are the best is mean you are the no. 1. 16:The world Happy is the same with "glad". 18:google is the best tools for search keyword ``` ??? { ?? } ??????? shell ???????????????????????????????????????^ ```html $ grep -n 'go\{2,5\}g' regular_express.txt ``` ?????????????? [???????](https://github.com/00000H/notes/blob/master/notes/%E6%AD%A3%E5%88%99%E8%A1%A8%E8%BE%BE%E5%BC%8F.md). ## printf ????????????? ????????????????? printf ????????????? $( ) ????? ```html $ printf '%10s %5i %5i %5i %8.2f \n' $(cat printf.txt) DmTsai 80 60 92 77.33 VBird 75 55 80 70.00 Ken 60 90 70 73.33 ``` ## awk ```html $ awk '???????? 1{???? 1} ???????? 2{???? 2} ...' filename ``` awk ??????????????????????????????????????\$n??n ??????? 1 ?????\$0 ???????? ???? 1???????????????????? ip ```html $ last -n 5 dmtsai pts/0 192.168.1.100 Tue Jul 14 17:32 still logged in dmtsai pts/0 192.168.1.100 Thu Jul 9 23:36 - 02:58 (03:22) dmtsai pts/0 192.168.1.100 Thu Jul 9 17:23 - 23:36 (06:12) dmtsai pts/0 192.168.1.100 Thu Jul 9 08:02 - 08:17 (00:14) dmtsai tty1 Fri May 29 11:55 - 12:11 (00:15) $ last -n 5 | awk '{print $1 "\t" $3} ``` awk ?????? | ???????? | ???????? | | -- | -- | | NF | ?????????????? | | NR | ??????????????????? | | FS | ??????????????????? | ???? 2???????????????????????????????? ```html $ last -n 5 | awk '{print $1 "\t lines: " NR "\t columns: " NF}' dmtsai lines: 1 columns: 10 dmtsai lines: 2 columns: 10 dmtsai lines: 3 columns: 10 dmtsai lines: 4 columns: 10 dmtsai lines: 5 columns: 9 ``` ??????????????????????????? ==?? ???? 3??/etc/passwd ????????????? UID???? UID ?? 10 ??????????? ```text cat /etc/passwd | awk 'BEGIN {FS=":"} $3 < 10 {print $1 "\t " $3}' root 0 bin 1 daemon 2 ``` # vim ?????? ![](https://github.com/CyC2018/InterviewNotes/blob/master/pics/341c632a-1fc1-4068-9b9f-bf7ef68ebb4c.jpg) ????????????????????????????????????? | ???? | ???? | | -- | -- | | :w | ?????| | :w! | ?????????????????????????????????????????????????? | | :q | ??| | :q! | ???????????| | :wq | ????????| | :wq!| ???????????| # ?????? - ???. ?? ?? ?? Linux ? ?? ?? ?? ?? ? ?? ?? ??[J]. 2009. - [Linux ??????????????](https://www.ibm.com/developerworks/cn/linux/l-cn-rpmdpkg/index.html)