{"id":508,"date":"2025-10-16T16:29:52","date_gmt":"2025-10-16T08:29:52","guid":{"rendered":"https:\/\/www.chenqiang1986.cn\/?p=508"},"modified":"2025-10-16T16:35:54","modified_gmt":"2025-10-16T08:35:54","slug":"%e5%b8%b8%e7%94%a8linux-%e5%91%bd%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/www.cqchen86.cn\/index.php\/2025\/10\/16\/%e5%b8%b8%e7%94%a8linux-%e5%91%bd%e4%bb%a4\/","title":{"rendered":"\u5e38\u7528Linux \u547d\u4ee4\u5927\u5168"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/www.cqchen86.cn\/wp-content\/uploads\/2025\/10\/liunx\u547d\u4ee4-1024x576.jpg\" alt=\"\" class=\"wp-image-509\" srcset=\"https:\/\/www.cqchen86.cn\/wp-content\/uploads\/2025\/10\/liunx\u547d\u4ee4-1024x576.jpg 1024w, https:\/\/www.cqchen86.cn\/wp-content\/uploads\/2025\/10\/liunx\u547d\u4ee4-300x169.jpg 300w, https:\/\/www.cqchen86.cn\/wp-content\/uploads\/2025\/10\/liunx\u547d\u4ee4-768x432.jpg 768w, https:\/\/www.cqchen86.cn\/wp-content\/uploads\/2025\/10\/liunx\u547d\u4ee4.jpg 1280w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>1\u3001\u57fa\u672c\u547d\u4ee4<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>shutdown -h now \u5173\u95ed\u7cfb\u7edf(1)\ninit 0 \u5173\u95ed\u7cfb\u7edf(2)\ntelinit 0 \u5173\u95ed\u7cfb\u7edf(3)shutdown -h hours:minutes &amp;\u6309\u9884\u5b9a\u65f6\u95f4\u5173\u95ed\u7cfb\u7edfshutdown-c \u53d6\u6d88\u6309\u9884\u5b9a\u65f6\u95f4\u5173\u95ed\u7cfb\u7edfshutdown -r now \u91cd\u542f(1)reboot \u91cd\u542f(2)logout \u6ce8\u9500<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>2\u3001\u5173\u673a<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>shutdown\u00a0-h now #\u5173\u95ed\u7cfb\u7edf\ninit\u00a00\u00a0#\u5173\u95ed\u7cfb\u7edf\ntelinit\u00a00\u00a0#\u5173\u95ed\u7cfb\u7edf\nshutdown\u00a0-h hours:minutes &amp; #\u6309\u9884\u5b9a\u65f6\u95f4\u5173\u95ed\u7cfb\u7edf\nshutdown\u00a0-c #\u53d6\u6d88\u6309\u9884\u5b9a\u65f6\u95f4\u5173\u95ed\u7cfb\u7edf\nshutdown\u00a0-r now #\u91cd\u542f\nreboot\u00a0#\u91cd\u542f\nlogout\u00a0#\u6ce8\u9500<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>3\u3001\u6587\u4ef6\u548c\u76ee\u5f55<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>cd \/home # \u8fdb\u5165 '\/home' \u76ee\u5f55\ncd .. # \u8fd4\u56de\u4e0a\u4e00\u7ea7\u76ee\u5f55\ncd ..\/.. # \u8fd4\u56de\u4e0a\u4e24\u7ea7\u76ee\u5f55\ncd # \u8fdb\u5165\u4e2a\u4eba\u7684\u4e3b\u76ee\u5f55\ncd ~user1 # \u8fdb\u5165 user1 \u7684\u4e3b\u76ee\u5f55\ncd - # \u8fd4\u56de\u4e0a\u6b21\u6240\u5728\u7684\u76ee\u5f55\npwd # \u663e\u793a\u5de5\u4f5c\u8def\u5f84\nls # \u67e5\u770b\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\nls -F # \u67e5\u770b\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\nls -l # \u663e\u793a\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u8be6\u7ec6\u8d44\u6599\nls -a # \u663e\u793a\u9690\u85cf\u6587\u4ef6\nls *[0-9]* # \u663e\u793a\u5305\u542b\u6570\u5b57\u7684\u6587\u4ef6\u540d\u548c\u76ee\u5f55\u540d\ntree # \u663e\u793a\u6587\u4ef6\u548c\u76ee\u5f55\u7531\u6839\u76ee\u5f55\u5f00\u59cb\u7684\u6811\u5f62\u7ed3\u6784(1)\nlstree # \u663e\u793a\u6587\u4ef6\u548c\u76ee\u5f55\u7531\u6839\u76ee\u5f55\u5f00\u59cb\u7684\u6811\u5f62\u7ed3\u6784(2)\nmkdir dir1 # \u521b\u5efa\u4e00\u4e2a\u53eb\u505a 'dir1' \u7684\u76ee\u5f55\nmkdir dir1 dir2 # \u540c\u65f6\u521b\u5efa\u4e24\u4e2a\u76ee\u5f55\nmkdir -p \/tmp\/dir1\/dir2 # \u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\u6811\nrm -f file1 # \u5220\u9664\u4e00\u4e2a\u53eb\u505a 'file1' \u7684\u6587\u4ef6\nrmdir dir1 # \u5220\u9664\u4e00\u4e2a\u53eb\u505a 'dir1' \u7684\u76ee\u5f55\nrm -rf dir1 # \u5220\u9664\u4e00\u4e2a\u53eb\u505a 'dir1' \u7684\u76ee\u5f55\u5e76\u540c\u65f6\u5220\u9664\u5176\u5185\u5bb9\nrm -rf dir1 dir2 # \u540c\u65f6\u5220\u9664\u4e24\u4e2a\u76ee\u5f55\u53ca\u5b83\u4eec\u7684\u5185\u5bb9\nmv dir1 new_dir # \u91cd\u547d\u540d\/\u79fb\u52a8 \u4e00\u4e2a\u76ee\u5f55\ncp file1 file2 # \u590d\u5236\u4e00\u4e2a\u6587\u4ef6\ncp dir\/* . # \u590d\u5236\u4e00\u4e2a\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\u5230\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\ncp -a \/tmp\/dir1 . # \u590d\u5236\u4e00\u4e2a\u76ee\u5f55\u5230\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\ncp -a dir1 dir2 # \u590d\u5236\u4e00\u4e2a\u76ee\u5f55\nln -s file1 lnk1 # \u521b\u5efa\u4e00\u4e2a\u6307\u5411\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u8f6f\u94fe\u63a5\nln file1 lnk1 # \u521b\u5efa\u4e00\u4e2a\u6307\u5411\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u7269\u7406\u94fe\u63a5\ntouch -t 0712250000 file1 # \u4fee\u6539\u4e00\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u65f6\u95f4\u6233 - (YYMMDDhhmm)\nfile file1 # outputs the mime type of the file as text\niconv -l # \u5217\u51fa\u5df2\u77e5\u7684\u7f16\u7801\niconv -f fromEncoding -t toEncoding inputFile &gt; outputFile # \u5047\u8bbe\u8f93\u5165\u6587\u4ef6\u91c7\u7528 fromEncoding \u7f16\u7801\uff0c\u5c06\u5176\u8f6c\u6362\u4e3a toEncoding \u7f16\u7801\u5e76\u751f\u6210\u65b0\u6587\u4ef6\nfind . -maxdepth 1 -name *.jpg -print -exec convert &quot;{}&quot; -resize 80x60 &quot;thumbs\/{}&quot; ; # \u6279\u91cf\u8c03\u6574\u5f53\u524d\u76ee\u5f55\u4e2d\u7684\u6587\u4ef6\u5927\u5c0f\uff0c\u5e76\u5c06\u5176\u53d1\u9001\u5230\u7f29\u7565\u56fe\u76ee\u5f55\uff08\u9700\u8981 ImageMagick \u7684 convert \u5de5\u5177\uff09<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>4\u3001\u6587\u4ef6\u641c\u7d22<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>find \/ -name file1 # \u4ece '\/' \u5f00\u59cb\u8fdb\u5165\u6839\u6587\u4ef6\u7cfb\u7edf\u641c\u7d22\u6587\u4ef6\u548c\u76ee\u5f55\nfind \/ -user user1 # \u641c\u7d22\u5c5e\u4e8e\u7528\u6237 'user1' \u7684\u6587\u4ef6\u548c\u76ee\u5f55\nfind \/home\/user1 -name \\*.bin # \u5728\u76ee\u5f55 '\/home\/user1' \u4e2d\u641c\u7d22\u5e26\u6709'.bin' \u7ed3\u5c3e\u7684\u6587\u4ef6\nfind \/usr\/bin -type f -atime +100 # \u641c\u7d22\u5728\u8fc7\u53bb100\u5929\u5185\u672a\u88ab\u4f7f\u7528\u8fc7\u7684\u6267\u884c\u6587\u4ef6\nfind \/usr\/bin -type f -mtime -10 # \u641c\u7d22\u572810\u5929\u5185\u88ab\u521b\u5efa\u6216\u8005\u4fee\u6539\u8fc7\u7684\u6587\u4ef6\nfind \/ -name \\*.rpm -exec chmod 755 '{}' \\; # \u641c\u7d22\u4ee5 '.rpm' \u7ed3\u5c3e\u7684\u6587\u4ef6\u5e76\u5b9a\u4e49\u5176\u6743\u9650\u4e3a755\nfind \/ -xdev -name \\*.rpm # \u641c\u7d22\u4ee5 '.rpm' \u7ed3\u5c3e\u7684\u6587\u4ef6\uff0c\u5ffd\u7565\u5149\u9a71\u3001U\u76d8\u7b49\u53ef\u79fb\u52a8\u8bbe\u5907\nlocate \\*.ps # \u5bfb\u627e\u4ee5 '.ps' \u7ed3\u5c3e\u7684\u6587\u4ef6 - \u9700\u5148\u8fd0\u884c 'updatedb' \u547d\u4ee4\u66f4\u65b0\u7d22\u5f15\nwhereis halt # \u663e\u793ahalt\u547d\u4ee4\u5bf9\u5e94\u7684\u4e8c\u8fdb\u5236\u6587\u4ef6\u3001\u6e90\u7801\u6216man\u624b\u518c\u7684\u4f4d\u7f6e\nwhich halt # \u663e\u793ahalt\u4e8c\u8fdb\u5236\u6587\u4ef6\u6216\u53ef\u6267\u884c\u6587\u4ef6\u7684\u5b8c\u6574\u8def\u5f84<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>5\u3001\u6302\u8f7d\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>mount \/dev\/hda2 \/mnt\/hda2 # \u6302\u8f7dhda2\u76d8 - \u9700\u786e\u4fdd'\/mnt\/hda2'\u76ee\u5f55\u5df2\u5b58\u5728\numount \/dev\/hda2 # \u5378\u8f7dhda2\u76d8 - \u9700\u5148\u4ece'\/mnt\/hda2'\u6302\u8f7d\u70b9\u9000\u51fa\nfuser -km \/mnt\/hda2 # \u5f53\u8bbe\u5907\u7e41\u5fd9\u65f6\u5f3a\u5236\u5378\u8f7d\numount -n \/mnt\/hda2 # \u8fd0\u884c\u5378\u8f7d\u64cd\u4f5c\u800c\u4e0d\u5199\u5165\/etc\/mtab\u6587\u4ef6 - \u9002\u7528\u4e8e\u6587\u4ef6\u53ea\u8bfb\u6216\u78c1\u76d8\u5199\u6ee1\u7684\u60c5\u51b5\nmount \/dev\/fd0 \/mnt\/floppy # \u6302\u8f7d\u8f6f\u76d8\nmount \/dev\/cdrom \/mnt\/cdrom # \u6302\u8f7dcdrom\u6216dvdrom\nmount \/dev\/hdc \/mnt\/cdrecorder # \u6302\u8f7dcdrw\u6216dvdrom\nmount \/dev\/hdb \/mnt\/cdrecorder # \u6302\u8f7dcdrw\u6216dvdrom\nmount -o loop file.iso \/mnt\/cdrom # \u6302\u8f7dISO\u955c\u50cf\u6587\u4ef6\nmount -t vfat \/dev\/hda5 \/mnt\/hda5 # \u6302\u8f7dWindows FAT32\u6587\u4ef6\u7cfb\u7edf\nmount \/dev\/sda1 \/mnt\/usbdisk # \u6302\u8f7dUSB\u8bbe\u5907\uff08\u5982U\u76d8\u3001\u79fb\u52a8\u786c\u76d8\uff09\nmount -t smbfs -o username=user,password=pass \/\/WinClient\/share \/mnt\/share # \u6302\u8f7dWindows\u7f51\u7edc\u5171\u4eab<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>6\u3001\u78c1\u76d8\u7a7a\u95f4<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>df -h # \u663e\u793a\u5df2\u7ecf\u6302\u8f7d\u7684\u5206\u533a\u5217\u8868\uff08\u4ee5\u4eba\u7c7b\u53ef\u8bfb\u7684\u683c\u5f0f\uff09\nls -lSr | more # \u4ee5\u5c3a\u5bf8\u5927\u5c0f\u5347\u5e8f\u6392\u5217\u6587\u4ef6\u548c\u76ee\u5f55\uff0c\u5e76\u5206\u9875\u663e\u793a\ndu -sh dir1 # \u4f30\u7b97\u76ee\u5f55 'dir1' \u5df2\u7ecf\u4f7f\u7528\u7684\u78c1\u76d8\u7a7a\u95f4\uff08\u4ee5\u4eba\u7c7b\u53ef\u8bfb\u7684\u683c\u5f0f\uff09\ndu -sk * | sort -rn # \u4ee5\u5bb9\u91cf\u5927\u5c0f\u4e3a\u4f9d\u636e\u964d\u5e8f\u663e\u793a\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u5927\u5c0f\uff08\u5355\u4f4d\uff1aKB\uff09\nrpm -q -a --qf '%10{SIZE}t%{NAME}n' | sort -k1,1n # \u4ee5\u5927\u5c0f\u4e3a\u4f9d\u636e\u5347\u5e8f\u663e\u793a\u5df2\u5b89\u88c5\u7684rpm\u5305\u6240\u4f7f\u7528\u7684\u7a7a\u95f4\uff08\u9002\u7528\u4e8efedora\u3001redhat\u7c7b\u7cfb\u7edf\uff09\ndpkg-query -W -f='${Installed-Size;10}t${Package}n' | sort -k1,1n # \u4ee5\u5927\u5c0f\u4e3a\u4f9d\u636e\u5347\u5e8f\u663e\u793a\u5df2\u5b89\u88c5\u7684deb\u5305\u6240\u4f7f\u7528\u7684\u7a7a\u95f4\uff08\u9002\u7528\u4e8eubuntu\u3001debian\u7c7b\u7cfb\u7edf\uff09<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>7\u3001\u7528\u6237\u548c\u7fa4\u7ec4<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>groupadd group_name # \u521b\u5efa\u4e00\u4e2a\u65b0\u7528\u6237\u7ec4\ngroupdel group_name # \u5220\u9664\u4e00\u4e2a\u7528\u6237\u7ec4\ngroupmod -n new_group_name old_group_name # \u91cd\u547d\u540d\u4e00\u4e2a\u7528\u6237\u7ec4\nuseradd -c &quot;Name Surname&quot; -g admin -d \/home\/user1 -s \/bin\/bash user1 # \u521b\u5efa\u4e00\u4e2a\u5c5e\u4e8e&quot;admin&quot;\u7528\u6237\u7ec4\u7684\u7528\u6237\uff0c\u6307\u5b9a\u5bb6\u76ee\u5f55\u548c\u9ed8\u8ba4shell\nuseradd user1 # \u521b\u5efa\u4e00\u4e2a\u65b0\u7528\u6237\uff08\u4f7f\u7528\u9ed8\u8ba4\u914d\u7f6e\uff09\nuserdel -r user1 # \u5220\u9664\u4e00\u4e2a\u7528\u6237\uff08'-r'\u8868\u793a\u540c\u65f6\u5220\u9664\u4e3b\u76ee\u5f55\uff09\nusermod -c &quot;User FTP&quot; -g system -d \/ftp\/user1 -s \/bin\/nologin user1 # \u4fee\u6539\u7528\u6237\u5c5e\u6027\uff08\u6ce8\u91ca\u3001\u6240\u5c5e\u7ec4\u3001\u5bb6\u76ee\u5f55\u3001\u767b\u5f55shell\uff09\npasswd # \u4fee\u6539\u5f53\u524d\u7528\u6237\u7684\u53e3\u4ee4\npasswd user1 # \u4fee\u6539\u6307\u5b9a\u7528\u6237\u7684\u53e3\u4ee4\uff08\u4ec5root\u53ef\u6267\u884c\uff09\nchage -E 2005-12-31 user1 # \u8bbe\u7f6e\u7528\u6237\u53e3\u4ee4\u7684\u5931\u6548\u671f\u9650\npwck # \u68c0\u67e5'\/etc\/passwd'\u6587\u4ef6\u7684\u683c\u5f0f\u548c\u8bed\u6cd5\uff0c\u5e76\u4fee\u6b63\u9519\u8bef\u53ca\u68c0\u67e5\u5b58\u5728\u7684\u7528\u6237\ngrpck # \u68c0\u67e5'\/etc\/group'\u6587\u4ef6\u7684\u683c\u5f0f\u548c\u8bed\u6cd5\uff0c\u5e76\u4fee\u6b63\u9519\u8bef\u53ca\u68c0\u67e5\u5b58\u5728\u7684\u7fa4\u7ec4\nnewgrp group_name # \u767b\u5f55\u5230\u4e00\u4e2a\u65b0\u7684\u7fa4\u7ec4\uff0c\u4ee5\u6539\u53d8\u65b0\u521b\u5efa\u6587\u4ef6\u7684\u9884\u8bbe\u7fa4\u7ec4<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>8\u3001\u6587\u4ef6\u7684\u6743\u9650<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>ls -lh # \u663e\u793a\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u6743\u9650\u53ca\u8be6\u7ec6\u4fe1\u606f\uff08\u4eba\u7c7b\u53ef\u8bfb\u683c\u5f0f\uff09\nls \/tmp | pr -T5 -W$COLUMNS # \u5c06\u7ec8\u7aef\u5212\u5206\u62105\u680f\u663e\u793a\/tmp\u76ee\u5f55\u5185\u5bb9\n\n# \u6743\u9650\u8bbe\u7f6e\u57fa\u7840\u64cd\u4f5c\nchmod ugo+rwx directory1 # \u8bbe\u7f6e\u76ee\u5f55\u7684\u6240\u6709\u4eba(u)\u3001\u7fa4\u7ec4(g)\u53ca\u5176\u4ed6\u4eba(o)\u62e5\u6709\u8bfb(r)\u3001\u5199(w)\u548c\u6267\u884c(x)\u6743\u9650\nchmod go-rwx directory1 # \u5220\u9664\u7fa4\u7ec4(g)\u4e0e\u5176\u4ed6\u4eba(o)\u5bf9\u76ee\u5f55\u7684\u8bfb\u5199\u6267\u884c\u6743\u9650\nchmod +x \u6587\u4ef6\u8def\u5f84 # \u4e3a\u6240\u6709\u8005\u3001\u6240\u5c5e\u7ec4\u548c\u5176\u4ed6\u7528\u6237\u6dfb\u52a0\u6267\u884c\u6743\u9650\nchmod -x \u6587\u4ef6\u8def\u5f84 # \u4e3a\u6240\u6709\u8005\u3001\u6240\u5c5e\u7ec4\u548c\u5176\u4ed6\u7528\u6237\u5220\u9664\u6267\u884c\u6743\u9650\n\n# \u9488\u5bf9\u7279\u5b9a\u7528\u6237\u7684\u6743\u9650\u64cd\u4f5c\nchmod u+x \u6587\u4ef6\u8def\u5f84 # \u4e3a\u6240\u6709\u8005\u6dfb\u52a0\u6267\u884c\u6743\u9650\nchmod g+x \u6587\u4ef6\u8def\u5f84 # \u4e3a\u6240\u5c5e\u7ec4\u6dfb\u52a0\u6267\u884c\u6743\u9650\nchmod o+x \u6587\u4ef6\u8def\u5f84 # \u4e3a\u5176\u4ed6\u7528\u6237\u6dfb\u52a0\u6267\u884c\u6743\u9650\nchmod ug+x \u6587\u4ef6\u8def\u5f84 # \u4e3a\u6240\u6709\u8005\u3001\u6240\u5c5e\u7ec4\u6dfb\u52a0\u6267\u884c\u6743\u9650\nchmod =wx \u6587\u4ef6\u8def\u5f84 # \u4e3a\u6240\u6709\u7528\u6237\u6dfb\u52a0\u5199\u3001\u6267\u884c\u6743\u9650\uff0c\u53d6\u6d88\u8bfb\u6743\u9650\nchmod ug=wx \u6587\u4ef6\u8def\u5f84 # \u4e3a\u6240\u6709\u8005\u3001\u6240\u5c5e\u7ec4\u6dfb\u52a0\u5199\u3001\u6267\u884c\u6743\u9650\uff0c\u53d6\u6d88\u8bfb\u6743\u9650\n\n# \u6240\u6709\u8005\u4e0e\u7fa4\u7ec4\u5c5e\u6027\u4fee\u6539\nchown user1 file1 # \u6539\u53d8\u4e00\u4e2a\u6587\u4ef6\u7684\u6240\u6709\u4eba\u5c5e\u6027\nchown -R user1 directory1 # \u9012\u5f52\u6539\u53d8\u76ee\u5f55\u53ca\u5176\u4e2d\u6240\u6709\u6587\u4ef6\u7684\u6240\u6709\u4eba\u5c5e\u6027\nchgrp group1 file1 # \u6539\u53d8\u6587\u4ef6\u7684\u7fa4\u7ec4\u5c5e\u6027\nchown user1:group1 file1 # \u540c\u65f6\u6539\u53d8\u6587\u4ef6\u7684\u6240\u6709\u4eba\u548c\u7fa4\u7ec4\u5c5e\u6027\n\n# SUID\/SGID\/STICKY\u4f4d\u7ba1\u7406\nfind \/ -perm -u+s # \u7f57\u5217\u7cfb\u7edf\u4e2d\u6240\u6709\u4f7f\u7528\u4e86SUID\u63a7\u5236\u7684\u6587\u4ef6\nchmod u+s \/bin\/file1 # \u8bbe\u7f6e\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684SUID\u4f4d\uff08\u8fd0\u884c\u7528\u6237\u83b7\u5f97\u6240\u6709\u8005\u6743\u9650\uff09\nchmod u-s \/bin\/file1 # \u7981\u7528\u4e8c\u8fdb\u5236\u6587\u4ef6\u7684SUID\u4f4d\nchmod g+s \/home\/public # \u8bbe\u7f6e\u76ee\u5f55\u7684SGID\u4f4d\uff08\u7c7b\u4f3cSUID\uff0c\u9488\u5bf9\u76ee\u5f55\uff09\nchmod g-s \/home\/public # \u7981\u7528\u76ee\u5f55\u7684SGID\u4f4d\nchmod o+t \/home\/public # \u8bbe\u7f6e\u76ee\u5f55\u7684STICKY\u4f4d\uff08\u4ec5\u6240\u6709\u8005\u53ef\u5220\u9664\u6587\u4ef6\uff09\nchmod o-t \/home\/public # \u7981\u7528\u76ee\u5f55\u7684STICKY\u4f4d<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>9\u3001\u6587\u4ef6\u7684\u7279\u6b8a\u5c5e\u6027<\/p>\n\n\n\n<p>\u4f7f\u7528 \u201c+\u201d \u8bbe\u7f6e\u6743\u9650\uff0c\u4f7f\u7528 \u201c-\u201d \u7528\u4e8e\u53d6\u6d88<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>chattr +a file1 # \u53ea\u5141\u8bb8\u4ee5\u8ffd\u52a0\u65b9\u5f0f\u8bfb\u5199\u6587\u4ef6\nchattr +c file1 # \u5141\u8bb8\u8fd9\u4e2a\u6587\u4ef6\u80fd\u88ab\u5185\u6838\u81ea\u52a8\u538b\u7f29\/\u89e3\u538b\nchattr +d file1 # \u5728\u8fdb\u884c\u6587\u4ef6\u7cfb\u7edf\u5907\u4efd\u65f6\uff0cdump\u7a0b\u5e8f\u5c06\u5ffd\u7565\u8fd9\u4e2a\u6587\u4ef6\nchattr +i file1 # \u8bbe\u7f6e\u6210\u4e0d\u53ef\u53d8\u7684\u6587\u4ef6\uff0c\u4e0d\u80fd\u88ab\u5220\u9664\u3001\u4fee\u6539\u3001\u91cd\u547d\u540d\u6216\u8005\u94fe\u63a5\nchattr +s file1 # \u5141\u8bb8\u4e00\u4e2a\u6587\u4ef6\u88ab\u5b89\u5168\u5730\u5220\u9664\nchattr +S file1 # \u4e00\u65e6\u5e94\u7528\u7a0b\u5e8f\u5bf9\u8fd9\u4e2a\u6587\u4ef6\u6267\u884c\u4e86\u5199\u64cd\u4f5c\uff0c\u4f7f\u7cfb\u7edf\u7acb\u523b\u628a\u4fee\u6539\u7684\u7ed3\u679c\u5199\u5230\u78c1\u76d8\nchattr +u file1 # \u82e5\u6587\u4ef6\u88ab\u5220\u9664\uff0c\u7cfb\u7edf\u4f1a\u5141\u8bb8\u4f60\u5728\u4ee5\u540e\u6062\u590d\u8fd9\u4e2a\u88ab\u5220\u9664\u7684\u6587\u4ef6\nlsattr # \u663e\u793a\u6587\u4ef6\u7684\u7279\u6b8a\u5c5e\u6027<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>10\u3001\u6253\u5305\u548c\u538b\u7f29\u6587\u4ef6<\/p>\n\n\n\n<p>\uff08Fedora, Redhat\u53ca\u7c7b\u4f3c\u7cfb\u7edf<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>## \u4e00\u3001RPM\u5305\u5b89\u88c5\u4e0e\u66f4\u65b0\nrpm -ivh package.rpm # \u5b89\u88c5\u4e00\u4e2arpm\u5305\nrpm -ivh --nodeeps package.rpm # \u5b89\u88c5\u4e00\u4e2arpm\u5305\u5e76\u5ffd\u7565\u4f9d\u8d56\u5173\u7cfb\u8b66\u544a\nrpm -U package.rpm # \u66f4\u65b0\u4e00\u4e2arpm\u5305\uff08\u4e0d\u6539\u53d8\u914d\u7f6e\u6587\u4ef6\uff09\nrpm -F package.rpm # \u66f4\u65b0\u4e00\u4e2a\u786e\u5b9a\u5df2\u5b89\u88c5\u7684rpm\u5305\n\n## \u4e8c\u3001RPM\u5305\u67e5\u8be2\nrpm -qa # \u663e\u793a\u7cfb\u7edf\u4e2d\u6240\u6709\u5df2\u5b89\u88c5\u7684rpm\u5305\nrpm -qa | grep httpd # \u663e\u793a\u6240\u6709\u540d\u79f0\u5305\u542b&quot;httpd&quot;\u7684rpm\u5305\nrpm -qi package_name # \u83b7\u53d6\u5df2\u5b89\u88c5\u5305\u7684\u8be6\u7ec6\u4fe1\u606f\nrpm -qg &quot;System Environment\/Daemons&quot; # \u663e\u793a\u6307\u5b9a\u7ec4\u4ef6\u7684rpm\u5305\nrpm -ql package_name # \u663e\u793a\u5df2\u5b89\u88c5rpm\u5305\u63d0\u4f9b\u7684\u6587\u4ef6\u5217\u8868\nrpm -qc package_name # \u663e\u793a\u5df2\u5b89\u88c5rpm\u5305\u63d0\u4f9b\u7684\u914d\u7f6e\u6587\u4ef6\u5217\u8868\nrpm -q package_name --whatrequires # \u663e\u793a\u4e0e\u6307\u5b9arpm\u5305\u5b58\u5728\u4f9d\u8d56\u5173\u7cfb\u7684\u5217\u8868\nrpm -q package_name --whatprovides # \u663e\u793a\u6307\u5b9arpm\u5305\u63d0\u4f9b\u7684\u4f9d\u8d56\nrpm -q package_name --scripts # \u663e\u793a\u5b89\u88c5\/\u5220\u9664\u671f\u95f4\u6267\u884c\u7684\u811a\u672c\nrpm -q package_name --changelog # \u663e\u793arpm\u5305\u7684\u4fee\u6539\u5386\u53f2\nrpm -qf \/etc\/httpd\/conf\/httpd.conf # \u786e\u8ba4\u6307\u5b9a\u6587\u4ef6\u7531\u54ea\u4e2arpm\u5305\u63d0\u4f9b\nrpm -qp package.rpm -l # \u663e\u793a\u5c1a\u672a\u5b89\u88c5\u7684rpm\u5305\u63d0\u4f9b\u7684\u6587\u4ef6\u5217\u8868\n\n## \u4e09\u3001RPM\u5305\u9a8c\u8bc1\u4e0e\u7b7e\u540d\nrpm --import \/media\/cdrom\/RPM-GPG-KEY # \u5bfc\u5165\u516c\u94a5\u6570\u5b57\u8bc1\u4e66\nrpm --checksig package.rpm # \u786e\u8ba4rpm\u5305\u7684\u5b8c\u6574\u6027\nrpm -qa gpg-pubkey # \u786e\u8ba4\u5df2\u5b89\u88c5\u7684\u6240\u6709rpm\u5305\u7684\u5b8c\u6574\u6027\nrpm -V package_name # \u68c0\u67e5\u6587\u4ef6\u5c3a\u5bf8\u3001\u8bb8\u53ef\u3001\u7c7b\u578b\u3001\u6240\u6709\u8005\u7b49\u5c5e\u6027\nrpm -Va # \u68c0\u67e5\u7cfb\u7edf\u4e2d\u6240\u6709\u5df2\u5b89\u88c5\u7684rpm\u5305\uff08\u8c28\u614e\u4f7f\u7528\uff09\nrpm -Vp package.rpm # \u786e\u8ba4rpm\u5305\u5c1a\u672a\u5b89\u88c5\n\n## \u56db\u3001RPM\u5305\u5378\u8f7d\u4e0e\u9ad8\u7ea7\u64cd\u4f5c\nrpm -e package_name.rpm # \u5220\u9664\u4e00\u4e2arpm\u5305\nrpm2cpio package.rpm | cpio --extract --make-directories *bin* # \u4ecerpm\u5305\u63d0\u53d6\u53ef\u6267\u884c\u6587\u4ef6\nrpm -ivh \/usr\/src\/redhat\/RPMS\/`arch`\/package.rpm # \u4ece\u6e90\u7801\u5b89\u88c5\u6784\u5efa\u597d\u7684rpm\u5305\nrpmbuild --rebuild package_name.src.rpm # \u4ecerpm\u6e90\u7801\u6784\u5efarpm\u5305<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>12\u3001YUM \u8f6f\u4ef6\u5305\u5347\u7ea7\u5668<\/p>\n\n\n\n<p>\uff08Fedora, RedHat\u53ca\u7c7b\u4f3c\u7cfb\u7edf\uff09<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>yum install package_name # \u4e0b\u8f7d\u5e76\u5b89\u88c5\u4e00\u4e2arpm\u5305\nyum localinstall package_name.rpm # \u5b89\u88c5\u672c\u5730rpm\u5305\uff0c\u901a\u8fc7\u8f6f\u4ef6\u4ed3\u5e93\u89e3\u51b3\u4f9d\u8d56\u5173\u7cfb\nyum update # \u66f4\u65b0\u5f53\u524d\u7cfb\u7edf\u4e2d\u6240\u6709\u5b89\u88c5\u7684rpm\u5305\nyum update package_name # \u66f4\u65b0\u6307\u5b9a\u7684\u4e00\u4e2arpm\u5305\nyum remove package_name # \u5220\u9664\u4e00\u4e2arpm\u5305\nyum list # \u5217\u51fa\u5f53\u524d\u7cfb\u7edf\u4e2d\u5b89\u88c5\u7684\u6240\u6709\u5305\nyum search package_name # \u5728rpm\u4ed3\u5e93\u4e2d\u641c\u5bfb\u8f6f\u4ef6\u5305\nyum clean packages # \u6e05\u7406rpm\u7f13\u5b58\uff0c\u5220\u9664\u4e0b\u8f7d\u7684\u5305\nyum clean headers # \u5220\u9664\u6240\u6709\u5934\u6587\u4ef6\nyum clean all # \u5220\u9664\u6240\u6709\u7f13\u5b58\u7684\u5305\u548c\u5934\u6587\u4ef6<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>13\u3001DEB \u5305<\/p>\n\n\n\n<p>(Debian, Ubuntu \u4ee5\u53ca\u7c7b\u4f3c\u7cfb\u7edf)<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>## \u4e00\u3001DEB\u5305\u7ba1\u7406\u547d\u4ee4\uff08dpkg\uff09\ndpkg -i package.deb # \u5b89\u88c5\/\u66f4\u65b0\u4e00\u4e2adeb\u5305\ndpkg -r package_name # \u4ece\u7cfb\u7edf\u5220\u9664\u4e00\u4e2adeb\u5305\ndpkg -l # \u663e\u793a\u7cfb\u7edf\u4e2d\u6240\u6709\u5df2\u7ecf\u5b89\u88c5\u7684deb\u5305\ndpkg -l | grep httpd # \u663e\u793a\u6240\u6709\u540d\u79f0\u4e2d\u5305\u542b&quot;httpd&quot;\u5b57\u6837\u7684deb\u5305\ndpkg -s package_name # \u83b7\u5f97\u5df2\u5b89\u88c5\u7684\u7279\u5b9a\u5305\u7684\u8be6\u7ec6\u4fe1\u606f\ndpkg -L package_name # \u663e\u793a\u5df2\u5b89\u88c5\u7684deb\u5305\u63d0\u4f9b\u7684\u6587\u4ef6\u5217\u8868\ndpkg --contents package.deb # \u663e\u793a\u5c1a\u672a\u5b89\u88c5\u7684deb\u5305\u63d0\u4f9b\u7684\u6587\u4ef6\u5217\u8868\ndpkg -S \/bin\/ping # \u786e\u8ba4\u6307\u5b9a\u6587\u4ef6\u7531\u54ea\u4e2adeb\u5305\u63d0\u4f9b\n\n## \u4e8c\u3001APT\u8f6f\u4ef6\u5de5\u5177\u547d\u4ee4\uff08Debian\u3001Ubuntu\u53ca\u7c7b\u4f3c\u7cfb\u7edf\uff09\napt-get install package_name # \u5b89\u88c5\/\u66f4\u65b0\u4e00\u4e2adeb\u5305\napt-cdrom install package_name # \u4ece\u5149\u76d8\u5b89\u88c5\/\u66f4\u65b0\u4e00\u4e2adeb\u5305\napt-get update # \u5347\u7ea7\u8f6f\u4ef6\u5305\u5217\u8868\napt-get upgrade # \u5347\u7ea7\u6240\u6709\u5df2\u5b89\u88c5\u7684\u8f6f\u4ef6\napt-get remove package_name # \u4ece\u7cfb\u7edf\u5220\u9664\u4e00\u4e2adeb\u5305\napt-get check # \u786e\u8ba4\u4f9d\u8d56\u7684\u8f6f\u4ef6\u4ed3\u5e93\u6b63\u786e\napt-get clean # \u6e05\u7406\u4e0b\u8f7d\u7684\u8f6f\u4ef6\u5305\u7f13\u5b58\napt-cache search searched-package # \u641c\u7d22\u540d\u79f0\u5305\u542b\u6307\u5b9a\u5b57\u7b26\u4e32\u7684\u8f6f\u4ef6\u5305<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>14\u3001\u67e5\u770b\u6587\u4ef6\u5185\u5bb9<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>cat file1 # \u4ece\u7b2c\u4e00\u4e2a\u5b57\u8282\u5f00\u59cb\u6b63\u5411\u67e5\u770b\u6587\u4ef6\u7684\u5185\u5bb9\ntac file1 # \u4ece\u6700\u540e\u4e00\u884c\u5f00\u59cb\u53cd\u5411\u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\nmore file1 # \u5206\u9875\u67e5\u770b\u4e00\u4e2a\u957f\u6587\u4ef6\u7684\u5185\u5bb9\uff08\u4ec5\u6b63\u5411\u6d4f\u89c8\uff09\nless file1 # \u7c7b\u4f3c'more'\u547d\u4ee4\uff0c\u4f46\u652f\u6301\u6b63\u5411\u548c\u53cd\u5411\u6d4f\u89c8\u6587\u4ef6\u5185\u5bb9\nhead -2 file1 # \u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u7684\u524d\u4e24\u884c\ntail -2 file1 # \u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u7684\u6700\u540e\u4e24\u884c\ntail -f \/var\/log\/messages # \u5b9e\u65f6\u67e5\u770b\u6587\u4ef6\u65b0\u589e\u5185\u5bb9\uff08\u5e38\u7528\u4e8e\u65e5\u5fd7\u76d1\u63a7\uff09<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>15\u3001\u6587\u672c\u5904\u7406<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>## \u4e00\u3001\u57fa\u7840\u6587\u672c\u91cd\u5b9a\u5411\u4e0e\u5408\u5e76\uff08cat\uff09\ncat file1 file2 ... | command &lt;&gt; file1_in.txt_or_file1_out.txt # \u6587\u672c\u5904\u7406\u901a\u7528\u8bed\u6cd5\uff0c\u7ed3\u5408\u7ba1\u9053\uff08PIPE\uff09\u3001\u6807\u51c6\u8f93\u5165\uff08STDIN\uff09\u548c\u6807\u51c6\u8f93\u51fa\uff08STDOUT\uff09\ncat file1 | command(sed, grep, awk, etc...) &gt; result.txt # \u5904\u7406\u6587\u4ef6\u5185\u5bb9\uff0c\u5c06\u7ed3\u679c\u5199\u5165\u65b0\u6587\u4ef6\uff08\u8986\u76d6\u539f\u6709\u5185\u5bb9\uff09\ncat file1 | command(sed, grep, awk, etc...) &gt;&gt; result.txt # \u5904\u7406\u6587\u4ef6\u5185\u5bb9\uff0c\u5c06\u7ed3\u679c\u8ffd\u52a0\u5230\u5df2\u6709\u6587\u4ef6\u672b\u5c3e\ncat -n file1 # \u663e\u793a\u6587\u4ef6\u5185\u5bb9\u5e76\u6807\u6ce8\u6bcf\u4e00\u884c\u7684\u884c\u6570\n\n## \u4e8c\u3001\u6587\u672c\u641c\u7d22\uff08grep\uff09\ngrep Aug \/var\/log\/messages # \u5728\u6587\u4ef6'\/var\/log\/messages'\u4e2d\u67e5\u627e\u5173\u952e\u8bcd&quot;Aug&quot;\ngrep ^Aug \/var\/log\/messages # \u5728\u6587\u4ef6'\/var\/log\/messages'\u4e2d\u67e5\u627e\u4ee5&quot;Aug&quot;\u5f00\u5934\u7684\u884c\ngrep [0-9] \/var\/log\/messages # \u7b5b\u9009'\/var\/log\/messages'\u4e2d\u6240\u6709\u5305\u542b\u6570\u5b57\u7684\u884c\ngrep Aug -R \/var\/log\/* # \u5728\u76ee\u5f55'\/var\/log'\u53ca\u5b50\u76ee\u5f55\u4e2d\u9012\u5f52\u641c\u7d22\u5b57\u7b26\u4e32&quot;Aug&quot;\n\n## \u4e09\u3001\u6587\u672c\u7f16\u8f91\uff08sed\uff09\nsed 's\/stringa1\/stringa2\/g' example.txt # \u5c06example.txt\u4e2d\u7684&quot;string1&quot;\u5168\u5c40\u66ff\u6362\u4e3a&quot;string2&quot;\nsed '\/^$\/d' example.txt # \u4eceexample.txt\u4e2d\u5220\u9664\u6240\u6709\u7a7a\u767d\u884c\nsed '\/ *#\/d; \/^$\/d' example.txt # \u4eceexample.txt\u4e2d\u5220\u9664\u6240\u6709\u6ce8\u91ca\u884c\uff08#\u5f00\u5934\uff09\u548c\u7a7a\u767d\u884c\nsed -e '1d' result.txt # \u4ece\u6587\u4ef6\u4e2d\u6392\u9664\u7b2c\u4e00\u884c\nsed -n '\/stringa1\/p' example.txt # \u53ea\u663e\u793a\u5305\u542b\u8bcd\u6c47&quot;string1&quot;\u7684\u884c\nsed -e 's\/ *$\/\/' example.txt # \u5220\u9664\u6bcf\u4e00\u884c\u672b\u5c3e\u7684\u7a7a\u767d\u5b57\u7b26\nsed -e 's\/stringa1\/\/g' example.txt # \u4ece\u6587\u6863\u4e2d\u5220\u9664\u6240\u6709&quot;string1&quot;\uff0c\u4fdd\u7559\u5176\u4ed6\u5185\u5bb9\nsed -n '1,5p;5q' example.txt # \u67e5\u770b\u6587\u4ef6\u7b2c1\u884c\u5230\u7b2c5\u884c\u7684\u5185\u5bb9\nsed -n '5p;5q' example.txt # \u53ea\u67e5\u770b\u6587\u4ef6\u7b2c5\u884c\u7684\u5185\u5bb9\nsed -e 's\/00*\/0\/g' example.txt # \u7528\u5355\u4e2a&quot;0&quot;\u66ff\u6362\u6587\u4ef6\u4e2d\u7684\u8fde\u7eed\u591a\u4e2a&quot;0&quot;\n\n## \u56db\u3001\u5b57\u7b26\u8f6c\u6362\u4e0e\u5b57\u6bb5\u63d0\u53d6\uff08tr\/awk\uff09\necho 'esempio' | tr '[:lower:]' '[:upper:]' # \u5c06\u5b57\u7b26\u4e32\u4ece\u5c0f\u5199\u8f6c\u6362\u4e3a\u5927\u5199\ncat example.txt | awk 'NR%2==1' # \u5220\u9664example.txt\u4e2d\u7684\u6240\u6709\u5076\u6570\u884c\uff08\u4fdd\u7559\u5947\u6570\u884c\uff09\necho a b c | awk '{print $1}' # \u63d0\u53d6\u4e00\u884c\u4e2d\u7684\u7b2c\u4e00\u680f\uff08\u5b57\u6bb5\uff09\necho a b c | awk '{print $1,$3}' # \u63d0\u53d6\u4e00\u884c\u4e2d\u7684\u7b2c\u4e00\u680f\u548c\u7b2c\u4e09\u680f\uff08\u5b57\u6bb5\uff09\n\n## \u4e94\u3001\u6587\u4ef6\u5408\u5e76\uff08paste\uff09\npaste file1 file2 # \u6309\u884c\u5408\u5e76\u4e24\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\uff08\u5de6\u53f3\u5bf9\u5e94\uff09\npaste -d '+' file1 file2 # \u6309\u884c\u5408\u5e76\u4e24\u4e2a\u6587\u4ef6\uff0c\u5b57\u6bb5\u95f4\u7528&quot;+&quot;\u5206\u9694\n\n## \u516d\u3001\u6587\u672c\u6392\u5e8f\u4e0e\u53bb\u91cd\uff08sort\/uniq\uff09\nsort file1 file2 # \u5408\u5e76\u5e76\u6392\u5e8f\u4e24\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\nsort file1 file2 | uniq # \u53d6\u4e24\u4e2a\u6587\u4ef6\u7684\u5e76\u96c6\uff08\u91cd\u590d\u884c\u53ea\u4fdd\u75591\u4efd\uff09\nsort file1 file2 | uniq -u # \u5220\u9664\u4e24\u4e2a\u6587\u4ef6\u7684\u4ea4\u96c6\uff0c\u4fdd\u7559\u4ec5\u5728\u5355\u4e2a\u6587\u4ef6\u4e2d\u5b58\u5728\u7684\u884c\nsort file1 file2 | uniq -d # \u53d6\u4e24\u4e2a\u6587\u4ef6\u7684\u4ea4\u96c6\uff08\u53ea\u4fdd\u7559\u540c\u65f6\u5b58\u5728\u4e8e\u4e24\u4e2a\u6587\u4ef6\u4e2d\u7684\u884c\uff09\n\n## \u4e03\u3001\u6587\u4ef6\u5185\u5bb9\u6bd4\u8f83\uff08comm\uff09\ncomm -1 file1 file2 # \u6bd4\u8f83\u4e24\u4e2a\u6587\u4ef6\uff0c\u53ea\u5220\u9664file1\u72ec\u6709\u7684\u5185\u5bb9\ncomm -2 file1 file2 # \u6bd4\u8f83\u4e24\u4e2a\u6587\u4ef6\uff0c\u53ea\u5220\u9664file2\u72ec\u6709\u7684\u5185\u5bb9\ncomm -3 file1 file2 # \u6bd4\u8f83\u4e24\u4e2a\u6587\u4ef6\uff0c\u53ea\u5220\u9664\u4e24\u4e2a\u6587\u4ef6\u5171\u6709\u7684\u5185\u5bb9\n<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>16\u3001\u5b57\u7b26\u8bbe\u7f6e\u548c\u6587\u4ef6\u683c\u5f0f\u8f6c\u6362<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>dos2unix\u00a0filedos.txt fileunix.txt #\u5c06\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u7684\u683c\u5f0f\u4eceMSDOS\u8f6c\u6362\u6210UNIX\nunix2dos fileunix.txt filedos.txt #\u5c06\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u7684\u683c\u5f0f\u4eceUNIX\u8f6c\u6362\u6210MSDOS\nrecode ..HTML &lt; page.txt &gt; page.html #\u5c06\u4e00\u4e2a\u6587\u672c\u6587\u4ef6\u8f6c\u6362\u6210html\nrecode -l | more #\u663e\u793a\u6240\u6709\u5141\u8bb8\u7684\u8f6c\u6362\u683c\u5f0f<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>17\u3001\u6587\u4ef6\u7cfb\u7edf\u5206\u6790<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>\u4e00\u3001\u78c1\u76d8\u574f\u5757\u68c0\u67e5\uff08badblocks\uff09\u200b\nbadblocks -v \/dev\/hda1 # \u68c0\u67e5\u78c1\u76d8 hda1 \u4e0a\u7684\u574f\u78c1\u5757\uff0c-v \u53c2\u6570\u663e\u793a\u8be6\u7ec6\u68c0\u67e5\u8fc7\u7a0b\u200b\n\u4e8c\u3001\u6587\u4ef6\u7cfb\u7edf\u5b8c\u6574\u6027\u4fee\u590d\uff08fsck \u7cfb\u5217\uff09\u200b\n1. \u901a\u7528 \/ext2 \u6587\u4ef6\u7cfb\u7edf\u200b\nfsck \/dev\/hda1 # \u4fee\u590d \/ \u68c0\u67e5 hda1 \u78c1\u76d8\u4e0a Linux \u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\uff08\u81ea\u52a8\u8bc6\u522b\u6587\u4ef6\u7cfb\u7edf\u7c7b\u578b\uff09\u200b\nfsck.ext2 \/dev\/hda1 # \u4fee\u590d \/ \u68c0\u67e5 hda1 \u78c1\u76d8\u4e0a ext2 \u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\u200b\ne2fsck \/dev\/hda1 # \u4fee\u590d \/ \u68c0\u67e5 hda1 \u78c1\u76d8\u4e0a ext2 \u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\uff08ext2 \u4e13\u5c5e\u4fee\u590d\u5de5\u5177\uff09\u200b\n2. ext3 \u6587\u4ef6\u7cfb\u7edf\u200b\ne2fsck -j \/dev\/hda1 # \u4fee\u590d \/ \u68c0\u67e5 hda1 \u78c1\u76d8\u4e0a ext3 \u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\uff08-j \u8bc6\u522b ext3 \u65e5\u5fd7\uff09\u200b\nfsck.ext3 \/dev\/hda1 # \u4fee\u590d \/ \u68c0\u67e5 hda1 \u78c1\u76d8\u4e0a ext3 \u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\u200b\n3. FAT\/DOS \u6587\u4ef6\u7cfb\u7edf\u200b\nfsck.vfat\/dev\/hda1 # \u4fee\u590d \/ \u68c0\u67e5 hda1 \u78c1\u76d8\u4e0a FAT \u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\u200b\nfsck.msdos\/dev\/hda1 # \u4fee\u590d \/ \u68c0\u67e5 hda1 \u78c1\u76d8\u4e0a DOS \u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\u200b\ndosfsck \/dev\/hda1 # \u4fee\u590d \/ \u68c0\u67e5 hda1 \u78c1\u76d8\u4e0a DOS \u6587\u4ef6\u7cfb\u7edf\u7684\u5b8c\u6574\u6027\uff08DOS\/FAT \u4e13\u5c5e\u4fee\u590d\u5de5\u5177\uff09<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>18\u3001\u521d\u59cb\u5316\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>mkfs \/dev\/hda1 #\u5728hda1\u5206\u533a\u521b\u5efa\u4e00\u4e2a\u6587\u4ef6\u7cfb\u7edf\nmke2fs \/dev\/hda1 #\u5728hda1\u5206\u533a\u521b\u5efa\u4e00\u4e2alinux ext2\u7684\u6587\u4ef6\u7cfb\u7edf\nmke2fs -j \/dev\/hda1 #\u5728hda1\u5206\u533a\u521b\u5efa\u4e00\u4e2alinux ext3(\u65e5\u5fd7\u578b)\u7684\u6587\u4ef6\u7cfb\u7edf\nmkfs -t vfat 32 -F \/dev\/hda1 #\u521b\u5efa\u4e00\u4e2a FAT32 \u6587\u4ef6\u7cfb\u7edf\nfdformat -n \/dev\/fd0 #\u683c\u5f0f\u5316\u4e00\u4e2a\u8f6f\u76d8\nmkswap \/dev\/hda3 #\u521b\u5efa\u4e00\u4e2aswap\u6587\u4ef6\u7cfb\u7edf<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>19\u3001SWAP\u6587\u4ef6\u7cfb\u7edf<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>mkswap \/dev\/hda3 #\u521b\u5efa\u4e00\u4e2aswap\u6587\u4ef6\u7cfb\u7edf\nswapon \/dev\/hda3 #\u542f\u7528\u4e00\u4e2a\u65b0\u7684swap\u6587\u4ef6\u7cfb\u7edf\nswapon \/dev\/hda2 \/dev\/hdb3 #\u542f\u7528\u4e24\u4e2aswap\u5206\u533a<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>20\u3001\u5907\u4efd<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>### \u4e00\u3001\u76ee\u5f55\u5907\u4efd\u547d\u4ee4\n- dump -0aj -f \/tmp\/home0.bak \/home \u5236\u4f5c\u4e00\u4e2a '\/home' #\u76ee\u5f55\u7684\u5b8c\u6574\u5907\u4efd\n- dump -1aj -f \/tmp\/home0.bak \/home \u5236\u4f5c\u4e00\u4e2a '\/home' #\u76ee\u5f55\u7684\u4ea4\u4e92\u5f0f\u5907\u4efd\n- tar -Puf backup.tar \/home\/user \u6267\u884c\u4e00\u6b21\u5bf9 '\/home\/user' #\u76ee\u5f55\u7684\u4ea4\u4e92\u5f0f\u5907\u4efd\u64cd\u4f5c\n\n\n### \u4e8c\u3001\u5907\u4efd\u8fd8\u539f\u547d\u4ee4\n- restore -if \/tmp\/home0.bak \u8fd8\u539f\u4e00\u4e2a #\u4ea4\u4e92\u5f0f\u5907\u4efd\n- dd if=\/dev\/fd0 of=\/dev\/hda bs=512 count=1  #\u4ece\u5df2\u7ecf\u4fdd\u5b58\u5230\u8f6f\u76d8\u7684\u5907\u4efd\u4e2d\u6062\u590d MBR\u5185\u5bb9\n\n\n### \u4e09\u3001\u78c1\u76d8\u4e0e\u5206\u533a\u64cd\u4f5c\n- dd if=\/dev\/sda of=\/tmp\/file1 \u5907\u4efd #\u78c1\u76d8\u5185\u5bb9\u5230\u4e00\u4e2a\u6587\u4ef6\n- dd bs=1M if=\/dev\/hda | gzip | ssh user@ip_addr 'dd of=hda.gz'  #\u901a\u8fc7ssh\u5728 \u8fdc\u7a0b\u4e3b\u673a\u4e0a\u6267\u884c\u4e00\u6b21\u5907\u4efd\u672c\u5730\u78c1\u76d8\u7684\u64cd\u4f5c\n- dd if=\/dev\/hda of=\/dev\/fd0 bs=512 count=1 \u505a\u4e00\u4e2a\u5c06 #MBR (Master Boot Record)\u5185\u5bb9\u590d\u5236\u5230\u8f6f\u76d8\u7684\u52a8\u4f5c\n\n\n### \u56db\u3001\u76ee\u5f55\u4e0e\u6587\u4ef6\u540c\u6b65\/\u590d\u5236\n- rsync -rogpav --delete \/home \/tmp \u540c\u6b65\u4e24\u8fb9\u7684 #\u76ee\u5f55\n- rsync -rogpav -e ssh --delete \/home ip_address:\/tmp  #\u901a\u8fc7SSH\u901a\u9053 rsync\n- rsync -az -e ssh --delete ip_addr:\/home\/public \/home\/local  #\u901a\u8fc7ssh\u548c\u538b\u7f29\u5c06\u4e00\u4e2a \u8fdc\u7a0b\u76ee\u5f55\u540c\u6b65\u5230\u672c\u5730\u76ee\u5f55\n- rsync -az -e ssh --delete \/home\/local ip_addr:\/home\/public \u901a\u8fc7ssh\u548c\u538b\u7f29\u5c06 #\u672c\u5730\u76ee\u5f55\u540c\u6b65\u5230\u8fdc\u7a0b\u76ee\u5f55\n- ( cd \/tmp\/local\/ &amp;&amp; tar c . ) | ssh -C user@ip_addr 'cd \/home\/share\/ &amp;&amp; tar x -p'  #\u901a\u8fc7ssh\u5728 \u8fdc\u7a0b\u76ee\u5f55\u4e2d\u590d\u5236\u4e00\u4e2a\u76ee\u5f55\u5185\u5bb9\n- ( tar c \/home ) | ssh -C user@ip_addr 'cd \/home\/backup-home &amp;&amp; tar x -p'  #\u901a\u8fc7ssh\u5728 #\u8fdc\u7a0b\u76ee\u5f55\u4e2d\u590d\u5236\u4e00\u4e2a\u672c\u5730\u76ee\u5f55\n- tar cf - . | (cd \/tmp\/backup ; tar xf - )  #\u672c\u5730\u5c06\u4e00\u4e2a \u76ee\u5f55\u590d\u5236\u5230\u53e6\u4e00\u4e2a\u5730\u65b9\uff0c\u4fdd\u7559\u539f\u6709\u6743\u9650\u53ca\u94fe\u63a5\n- find \/home\/user1 -name '*.txt' | xargs cp -av --target-directory=\/home\/backup\/ --parents #\u4ece\u4e00\u4e2a\u76ee\u5f55\u67e5\u627e\u5e76\u590d\u5236\u6240\u6709\u4ee5 '.txt' \u7ed3\u5c3e\u7684 \u6587\u4ef6\u5230\u53e6\u4e00\u4e2a\u76ee\u5f55\n- find \/var\/log -name '*.log' | tar cv --files-from=- | bzip2 &gt; log.tar.bz2 #\u67e5\u627e\u6240\u6709\u4ee5 '.log' \u7ed3\u5c3e\u7684 \u6587\u4ef6\u5e76\u505a\u6210\u4e00\u4e2abzip\u5305<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>21\u3001\u5149\u76d8<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>cdrecord -v gracetime=2 dev=\/dev\/cdrom -eject blank=fast -force # \u6e05\u7a7a\u53ef\u590d\u5199\u5149\u76d8\u7684\u5185\u5bb9\nmkisofs \/dev\/cdrom &gt; cd.iso # \u5728\u78c1\u76d8\u4e0a\u521b\u5efa\u5149\u76d8\u7684 ISO \u955c\u50cf\u6587\u4ef6\nmkisofs \/dev\/cdrom | gzip &gt; cd_iso.gz # \u5728\u78c1\u76d8\u4e0a\u521b\u5efa\u5149\u76d8\u7684\u538b\u7f29 ISO \u955c\u50cf\u6587\u4ef6\nmkisofs -J -allow-leading-dots -R -V &quot;Label CD&quot; -iso-level 4 -o .\/cd.iso data_cd # \u521b\u5efa\u6307\u5b9a\u76ee\u5f55\uff08data_cd\uff09\u7684 ISO \u955c\u50cf\u6587\u4ef6\ncdrecord -v dev=\/dev\/cdrom cd.iso # \u523b\u5f55 ISO \u955c\u50cf\u6587\u4ef6\u5230\u5149\u76d8\ngzip -dc cd_iso.gz | cdrecord dev=\/dev\/cdrom - # \u523b\u5f55\u538b\u7f29\u7684 ISO \u955c\u50cf\u6587\u4ef6\u5230\u5149\u76d8\nmount -o loop cd.iso\/mnt\/iso # \u6302\u8f7d ISO \u955c\u50cf\u6587\u4ef6\u5230 \/mnt\/iso \u76ee\u5f55\ncd-paranoia -B # \u4ece CD \u5149\u76d8\u4e2d\u8f6c\u5f55\u97f3\u8f68\u5230 WAV \u6587\u4ef6\ncd-paranoia -- &quot;-3&quot; # \u4ece CD \u5149\u76d8\u4e2d\uff08\u5e26\u53c2\u6570 - 3\uff09\u8f6c\u5f55\u97f3\u8f68\u5230 WAV \u6587\u4ef6\ncdrecord --scanbus # \u626b\u63cf\u603b\u7ebf\u4ee5\u8bc6\u522b SCSI \u901a\u9053\uff08\u7528\u4e8e\u786e\u8ba4\u5149\u76d8\u8bbe\u5907\uff09\ndd if=\/dev\/hdc | md5sum # \u6821\u9a8c\u8bbe\u5907\uff08\u5982 CD \u5149\u76d8 \/dev\/hdc\uff09\u7684 MD5SUM \u7f16\u7801<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>22\u3001\u7f51\u7edc<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>ifconfig eth0 # \u663e\u793a\u4ee5\u592a\u7f51\u5361 eth0 \u7684\u914d\u7f6e\u4fe1\u606f\nifup eth0 # \u542f\u7528\u7f51\u7edc\u8bbe\u5907 eth0\nifdown eth0 # \u7981\u7528\u7f51\u7edc\u8bbe\u5907 eth0\nifconfig eth0 192.168.1.1 netmask 255.255.255.0 # \u4e3a eth0 \u914d\u7f6e IP \u5730\u5740\uff08192.168.1.1\uff09\u548c\u5b50\u7f51\u63a9\u7801\uff08255.255.255.0\uff09\nifconfig eth0 promisc # \u5c06 eth0 \u8bbe\u7f6e\u4e3a\u6df7\u6742\u6a21\u5f0f\uff08\u7528\u4e8e\u6570\u636e\u5305\u55c5\u63a2\uff09\ndhclient eth0 # \u4ee5 DHCP \u6a21\u5f0f\u542f\u7528 eth0\uff08\u81ea\u52a8\u83b7\u53d6 IP \u5730\u5740\uff09\nroute -n # \u663e\u793a\u8def\u7531\u8868\nroute add -net 0\/0 gw IP_Gateway # \u914d\u7f6e\u9ed8\u8ba4\u7f51\u5173\uff08\u5c06 IP_Gateway \u66ff\u6362\u4e3a\u5b9e\u9645\u7f51\u5173 IP\uff09\nroute add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 # \u914d\u7f6e\u9759\u6001\u8def\u7531\uff08\u8bbf\u95ee 192.168.0.0\/16 \u7f51\u6bb5\u65f6\uff0c\u901a\u8fc7\u7f51\u5173 192.168.1.1 \u8f6c\u53d1\uff09\nroute del 0\/0 gw IP_Gateway # \u5220\u9664\u9ed8\u8ba4\u9759\u6001\u8def\u7531\uff08\u5c06 IP_Gateway \u66ff\u6362\u4e3a\u5b9e\u9645\u7f51\u5173 IP\uff09\necho &quot;1&quot; &gt; \/proc\/sys\/net\/ipv4\/ip_forward # \u542f\u7528 IP \u8def\u7531\u8f6c\u53d1\u529f\u80fd\nhostname # \u663e\u793a\u7cfb\u7edf\u4e3b\u673a\u540d\nhost www.example.com # \u89e3\u6790\u4e3b\u673a\u540d\uff08\u5c06www.example.com\u8f6c\u6362\u4e3a IP \u5730\u5740\uff0c\u6216\u53cd\u5411\u89e3\u6790 IP \u4e3a\u57df\u540d\uff09\nnslookup www.example.com # \u89e3\u6790\u4e3b\u673a\u540d\uff08\u5c06www.example.com\u8f6c\u6362\u4e3a IP \u5730\u5740\uff0c\u6216\u53cd\u5411\u89e3\u6790 IP \u4e3a\u57df\u540d\uff09\nip link show # \u663e\u793a\u6240\u6709\u7f51\u7edc\u63a5\u53e3\u7684\u94fe\u8def\u72b6\u6001\nmii-tool eth0 # \u663e\u793a\u7f51\u7edc\u8bbe\u5907 eth0 \u7684\u94fe\u8def\u72b6\u6001\nethtool eth0 # \u663e\u793a\u7f51\u5361 eth0 \u7684\u7edf\u8ba1\u4fe1\u606f\nnetstat -tup # \u663e\u793a\u6240\u6709\u6d3b\u8dc3\u7684\u7f51\u7edc\u8fde\u63a5\u53ca\u5176\u5bf9\u5e94\u7684\u8fdb\u7a0b PID\nnetstat -tupl # \u663e\u793a\u7cfb\u7edf\u4e0a\u6240\u6709\u76d1\u542c\u7684\u7f51\u7edc\u670d\u52a1\u53ca\u5176\u5bf9\u5e94\u7684\u8fdb\u7a0b PID\ntcpdump tcp port 80 # \u6293\u53d6\u6240\u6709 TCP 80 \u7aef\u53e3\u7684\u7f51\u7edc\u6d41\u91cf\uff08\u5373 HTTP \u6d41\u91cf\uff09\niwlist scan # \u626b\u63cf\u5468\u56f4\u53ef\u7528\u7684\u65e0\u7ebf\u7f51\u7edc\niwconfig eth1 # \u663e\u793a\u65e0\u7ebf\u7f51\u5361 eth1 \u7684\u914d\u7f6e\u4fe1\u606f\nwhois www.example.com # \u5728 Whois \u6570\u636e\u5e93\u4e2d\u67e5\u8be2\u57df\u540dwww.example.com\u7684\u6ce8\u518c\u4fe1\u606f<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>23\u3001\u5217\u51fa\u76ee\u5f55\u5185\u5bb9<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>ls -a # \u663e\u793a\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\uff08\u5305\u62ec\u4ee5\u3002\u5f00\u5934\u7684\u9690\u85cf\u6587\u4ef6\uff09\nls -l # \u4ee5\u957f\u683c\u5f0f\u663e\u793a\u5f53\u524d\u76ee\u5f55\u4e0b\u6587\u4ef6\u7684\u8be6\u7ec6\u4fe1\u606f\uff08\u542b\u6743\u9650\u3001\u5927\u5c0f\u3001\u4fee\u6539\u65f6\u95f4\u7b49\uff09\nls -R # \u9012\u5f52\u663e\u793a\u5f53\u524d\u76ee\u5f55\u53ca\u5176\u6240\u6709\u5b50\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\u7ed3\u6784\nls -ld # \u4ec5\u663e\u793a\u76ee\u5f55\u672c\u8eab\u6216\u94fe\u63a5\u6587\u4ef6\u7684\u8be6\u7ec6\u4fe1\u606f\uff08\u4e0d\u5c55\u793a\u76ee\u5f55\u5185\u5185\u5bb9\uff09\nctrl+r # \u5feb\u6377\u952e\uff1a\u5728\u547d\u4ee4\u5386\u53f2\u8bb0\u5f55\u4e2d\u641c\u7d22\u547d\u4ee4\uff08\u8f93\u5165\u547d\u4ee4\u4e2d\u4efb\u610f\u5b57\u7b26\u5373\u53ef\u5339\u914d\uff09\npwd # \u663e\u793a\u5f53\u524d\u6240\u5728\u7684\u5de5\u4f5c\u76ee\u5f55\u8def\u5f84\n\uff08\u8865\u5145\u8bf4\u660e\uff09# Linux \u7cfb\u7edf\u4e2d\uff0c\u4ee5\u82f1\u6587\u53e5\u53f7 \u201c.\u201d \u5f00\u5934\u7684\u6587\u4ef6\u6216\u76ee\u5f55\u4e3a\u9690\u85cf\u6587\u4ef6 \/ \u76ee\u5f55<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>24\u3001\u67e5\u770b\u6587\u4ef6\u7684\u7c7b\u578b<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>file:\u67e5\u770b\u6587\u4ef6\u7684\u7c7b\u578b<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>25\u3001\u590d\u5236\u6587\u4ef6\u76ee\u5f55\u7b49\u64cd\u4f5c<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>- cp \u6e90\u6587\u4ef6\uff08\u6587\u4ef6\u5939\uff09\u76ee\u6807\u6587\u4ef6\uff08\u6587\u4ef6\u5939\uff09 # \u590d\u5236\u6587\u4ef6\u548c\u76ee\u5f55\n- cp -r \u6e90\u6587\u4ef6\u5939 \u76ee\u6807\u6587\u4ef6\u5939 # \u9012\u5f52\u590d\u5236\u6574\u4e2a\u76ee\u5f55\u6811\uff08\u590d\u5236\u6587\u4ef6\u5939\u5fc5\u987b\u4f7f\u7528\uff09\n- cp -v \u6e90\u6587\u4ef6 \u76ee\u6807\u6587\u4ef6 # \u590d\u5236\u6587\u4ef6\u65f6\u663e\u793a\u8be6\u7ec6\u4fe1\u606f\n- touch \u6587\u4ef6\u540d # \u5f53\u6587\u4ef6\u4e0d\u5b58\u5728\u65f6\u521b\u5efa\u6587\u4ef6\uff1b\u5f53\u6587\u4ef6\u5b58\u5728\u65f6\u4fee\u6539\u5176\u521b\u5efa\u65f6\u95f4\uff08\u751f\u6210\u7a7a\u6587\u4ef6\u6216\u4fee\u6539\u6587\u4ef6\u7684\u5b58\u53d6\/\u4fee\u6539\u65f6\u95f4\u8bb0\u5f55\u503c\uff09\n- touch * # \u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u7684\u65f6\u95f4\u4fee\u6539\u4e3a\u7cfb\u7edf\u5f53\u524d\u65f6\u95f4\n- touch -d 20040210 test # \u5c06test\u6587\u4ef6\u7684\u65e5\u671f\u6539\u4e3a2004\u5e742\u670810\u65e5\n- touch abc # \u82e5abc\u6587\u4ef6\u5b58\u5728\uff0c\u5219\u4fee\u6539\u4e3a\u7cfb\u7edf\u5f53\u524d\u65f6\u95f4\uff1b\u82e5\u4e0d\u5b58\u5728\uff0c\u5219\u751f\u6210\u4e00\u4e2a\u5f53\u524d\u65f6\u95f4\u7684\u7a7a\u6587\u4ef6\n- mv \u6587\u4ef6 \u76ee\u6807\u76ee\u5f55 # \u79fb\u52a8\u6587\u4ef6\u5230\u76ee\u6807\u76ee\u5f55\n- mv a.txt ..\/ # \u5c06a.txt\u6587\u4ef6\u79fb\u52a8\u5230\u4e0a\u5c42\u76ee\u5f55\n- mv a.txt b.txt # \u5c06a.txt\u6587\u4ef6\u91cd\u547d\u540d\u4e3ab.txt\n- mv dir2 ..\/ # \u5c06dir2\u76ee\u5f55\u4e0a\u79fb\u4e00\u5c42\n- rm \u6587\u4ef6\u540d # \u5220\u9664\u6587\u4ef6\n- rm -i \u6587\u4ef6\u540d # \u4ea4\u4e92\u5f0f\u5220\u9664\u6587\u4ef6\uff08\u5220\u9664\u524d\u4f1a\u8be2\u95ee\u786e\u8ba4\uff09\n- rm -r \u6587\u4ef6\u5939\u540d\u79f0 # \u9012\u5f52\u5220\u9664\u6587\u4ef6\u5939\uff08\u7a7a\u6587\u4ef6\u5939\u548c\u975e\u7a7a\u6587\u4ef6\u5939\u90fd\u53ef\u5220\u9664\uff09\n- mkdir \u6587\u4ef6\u5939\u540d\u79f0 # \u521b\u5efa\u6587\u4ef6\u5939\n- rmdir \u6587\u4ef6\u5939\u540d\u79f0 # \u5220\u9664\u6587\u4ef6\u5939\uff08\u53ea\u80fd\u5220\u9664\u7a7a\u6587\u4ef6\u5939\uff09\n- mkdir -p dir1\/dir2 # \u8fde\u7eed\u521b\u5efa\u591a\u7ea7\u76ee\u5f55\uff08\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u521b\u5efadir1\uff0c\u5e76\u5728dir1\u4e0b\u521b\u5efadir2\uff09\n- rmdir -p dir1\/dir2 # \u5220\u9664dir1\u4e0b\u7684dir2\u76ee\u5f55\uff0c\u82e5dir1\u76ee\u5f55\u4e3a\u7a7a\u5219\u4e00\u5e76\u5220\u9664\n- rm * # \u5220\u9664\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u6240\u6709\u6587\u4ef6\uff08\u4e0d\u5305\u62ec\u76ee\u5f55\uff09\n- rm -f *.txt # \u5f3a\u5236\u5220\u9664\u6240\u6709\u540e\u7f00\u540d\u4e3atxt\u7684\u6587\u4ef6\uff08\u4e0d\u8be2\u95ee\uff09\n- rm -i * # \u5220\u9664\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u65f6\u9010\u4e00\u8be2\u95ee\uff08\u9047\u5230\u76ee\u5f55\u4f1a\u81ea\u52a8\u7565\u8fc7\uff09\n- rm -r test # \u5220\u9664test\u76ee\u5f55\u53ca\u5176\u5305\u542b\u7684\u6240\u6709\u6587\u4ef6\u548c\u5b50\u76ee\u5f55\n- rm -r * # \u5220\u9664\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u3001\u6240\u6709\u5b50\u76ee\u5f55\u53ca\u5b50\u76ee\u5f55\u4e0b\u7684\u6587\u4ef6\n- rm -rf test # \u5f3a\u884c\u5220\u9664test\u76ee\u5f55\u53ca\u5176\u5185\u5bb9\uff0c\u4e0d\u8fdb\u884c\u8be2\u95ee\n- grep \u8981\u627e\u7684\u5b57\u4e32 \u8981\u5bfb\u627e\u5b57\u4e32\u7684\u6e90\u6587\u4ef6 # \u5728\u6587\u4ef6\u4e2d\u641c\u7d22\u5339\u914d\u7684\u5b57\u7b26\u5e76\u8f93\u51fa\u7ed3\u679c\n- grep linux test.txt # \u5728test.txt\u6587\u4ef6\u4e2d\u641c\u7d22\u5b57\u7b26\u4e32&quot;linux&quot;\u5e76\u8f93\u51fa\u5339\u914d\u5185\u5bb9\n- ln \u6e90\u6587\u4ef6\u6216\u76ee\u5f55 \u76ee\u6807\u6587\u4ef6\u6216\u76ee\u5f55 # \u5728\u6587\u4ef6\u548c\u76ee\u5f55\u4e4b\u95f4\u5efa\u7acb\u94fe\u63a5\uff08\u9ed8\u8ba4\u521b\u5efa\u786c\u94fe\u63a5\uff09\n- ln -s \/usr\/share\/do doc # \u521b\u5efa\u8f6f\u94fe\u63a5\u6587\u4ef6doc\uff0c\u6307\u5411\u76ee\u5f55\/usr\/share\/do\n- ln \/usr\/share\/test hard # \u521b\u5efa\u786c\u94fe\u63a5\u6587\u4ef6hard\uff0c\u6307\u5411\u6587\u4ef6\/usr\/share\/test\uff08\u589e\u52a0\u4e00\u4e2a\u6307\u5411\u8be5\u5b58\u50a8\u533a\u57df\u7684\u6587\u4ef6\uff09<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>26\u3001\u7cfb\u7edf\u5e38\u7528\u547d\u4ee4<\/p>\n\n\n\n<p>1\u3001\u663e\u793a\u547d\u4ee4<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>date # \u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u7684\u65f6\u95f4\uff08\u9ed8\u8ba4\u683c\u5f0f\uff09\ndate +% Y--% m--% d # \u4ee5 \u201c\u5e74 -- \u6708 -- \u65e5\u201d \u7684\u683c\u5f0f\u663e\u793a\u5f53\u524d\u7cfb\u7edf\u65f6\u95f4\ndate -s \u65f6\u95f4\u503c # \u8bbe\u7f6e\u5f53\u524d\u7cfb\u7edf\u7684\u65f6\u95f4\uff08\u4f8b\u5982 \u201cdate -s 2024-10-16 14:30\u201d \u8bbe\u7f6e\u4e3a 2024 \u5e74 10 \u6708 16 \u65e5 14 \u70b9 30 \u5206\uff09\nhwclock # \u663e\u793a\u786c\u4ef6\u65f6\u949f\u65f6\u95f4\uff08\u9700\u7ba1\u7406\u5458\u6743\u9650\uff0c\u4e5f\u53ef\u4f7f\u7528 \u201cclock\u201d \u547d\u4ee4\uff0c\u529f\u80fd\u76f8\u540c\uff09\ncal # \u663e\u793a\u5f53\u524d\u6708\u4efd\u7684\u65e5\u5386\ncal 4 2004 # \u663e\u793a 2004 \u5e74 4 \u6708\u4efd\u7684\u65e5\u5386\ncal -y 2003 # \u663e\u793a 2003 \u5e74\u4e00\u6574\u5e74\u7684\u65e5\u5386\nuptime # \u67e5\u770b\u7cfb\u7edf\u5f53\u524d\u7684\u8fd0\u884c\u65f6\u95f4\uff08\u542b\u5f00\u673a\u65f6\u957f\u3001\u7528\u6237\u6570\u3001\u7cfb\u7edf\u8d1f\u8f7d\u7b49\u4fe1\u606f\uff09<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>2\u3001\u8f93\u51fa\u67e5\u770b\u547d\u4ee4<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>echo &quot;liuyazhuang&quot; &gt;&gt; liuyazhuang.txt # \u5c06\u5b57\u7b26\u4e32 \u201cliuyazhuang\u201d \u8ffd\u52a0\u5230 liuyazhuang.txt \u6587\u4ef6\u672b\u5c3e\necho \u5185\u5bb9 # \u663e\u793a\u8f93\u5165\u7684\u6307\u5b9a\u5185\u5bb9\uff08\u5982 \u201cecho hello\u201d \u4f1a\u8f93\u51fa \u201chello\u201d\uff09\ncat test.txt # \u663e\u793a test.txt \u6587\u4ef6\u7684\u5168\u90e8\u5185\u5bb9\ncat test.txt | more # \u9010\u9875\u663e\u793a test.txt \u6587\u4ef6\u7684\u5185\u5bb9\uff08\u6309\u7a7a\u683c\u7ffb\u9875\uff0c\u6309 Q \u9000\u51fa\uff09\ncat test.txt &gt;&gt; test1.txt # \u5c06 test.txt \u7684\u5185\u5bb9\u9644\u52a0\u5230 test1.txt \u6587\u4ef6\u4e4b\u540e\uff08\u4e0d\u8986\u76d6\u539f\u5185\u5bb9\uff09\ncat test.txt test2.txt &gt; readme.txt # \u5c06 test.txt \u548c test2.txt \u7684\u5185\u5bb9\u5408\u5e76\uff0c\u751f\u6210\u5e76\u5199\u5165 readme.txt \u6587\u4ef6\uff08\u8986\u76d6\u539f\u6709\u5185\u5bb9\uff09\nhead \u6587\u4ef6\u540d # \u663e\u793a\u6587\u4ef6\u7684\u524d 10 \u884c\u5185\u5bb9\uff08\u9ed8\u8ba4\u663e\u793a 10 \u884c\uff09\nhead -n \u884c\u6570 \u6587\u4ef6\u540d # \u663e\u793a\u6587\u4ef6\u7684\u524d\u6307\u5b9a\u884c\u6570\u5185\u5bb9\uff08\u5982 \u201chead -5 test.txt\u201d \u663e\u793a test.txt \u524d 5 \u884c\uff09\ntail \/etc\/passwd # \u663e\u793a \/etc\/passwd \u6587\u4ef6\u7684\u6700\u540e 10 \u884c\u5185\u5bb9\uff08\u9ed8\u8ba4\u663e\u793a 10 \u884c\uff09\ntail -n \u884c\u6570 \u6587\u4ef6\u540d # \u663e\u793a\u6587\u4ef6\u7684\u6700\u540e\u6307\u5b9a\u884c\u6570\u5185\u5bb9\uff08\u5982 \u201ctail -3 test.txt\u201d \u663e\u793a test.txt \u6700\u540e 3 \u884c\uff09\ntail -f \u6587\u4ef6\u540d # \u8ffd\u8e2a\u663e\u793a\u6587\u4ef6\u7684\u5b9e\u65f6\u66f4\u65b0\u5185\u5bb9\uff08\u5e38\u7528\u4e8e\u67e5\u770b\u65e5\u5fd7\uff0c\u547d\u4ee4\u6301\u7eed\u8fd0\u884c\uff0c\u6309 Ctrl+C \u9000\u51fa\uff09\ntail -10 \/etc\/passwd # \u663e\u793a \/etc\/passwd \u6587\u4ef6\u7684\u5012\u6570 10 \u884c\u5185\u5bb9\ntail +10 \/etc\/passwd # \u663e\u793a \/etc\/passwd \u6587\u4ef6\u4ece\u7b2c 10 \u884c\u5f00\u59cb\u5230\u672b\u5c3e\u7684\u6240\u6709\u5185\u5bb9\nmore \u6587\u4ef6\u540d # \u7ffb\u9875\u663e\u793a\u6587\u4ef6\u5185\u5bb9\uff08\u4ec5\u652f\u6301\u5411\u4e0b\u7ffb\u9875\uff0c\u6309\u7a7a\u683c\u7ffb\u9875\uff0c\u6309 Q \u9000\u51fa\uff09\nls -al | more # \u4ee5\u957f\u683c\u5f0f\u663e\u793a\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\uff0c\u5185\u5bb9\u6309\u9875\u5c55\u793a\uff08\u6ee1\u9875\u6682\u505c\uff0c\u7a7a\u683c\u7ee7\u7eed\uff0cQ \u9000\u51fa\uff09\nless \u6587\u4ef6\u540d # \u7ffb\u9875\u663e\u793a\u6587\u4ef6\u5185\u5bb9\uff08\u652f\u6301\u4e0a\u4e0b\u952e\u7ffb\u9875\uff0c\u6309 Q \u9000\u51fa\uff09\nls -al | less # \u4ee5\u957f\u683c\u5f0f\u663e\u793a\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\uff0c\u652f\u6301\u4e0a\u4e0b\u952e\u6eda\u52a8\u6d4f\u89c8\uff08\u6309 Q \u9000\u51fa\uff09<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>3\u3001\u67e5\u770b\u786c\u4ef6\u4fe1\u606f<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>lspci # \u67e5\u770b\u7cfb\u7edf\u4e2d\u6240\u6709 PCI \u8bbe\u5907\uff08\u5982\u663e\u5361\u3001\u7f51\u5361\u3001\u58f0\u5361\u7b49\uff09\nlspci -v # \u67e5\u770b\u7cfb\u7edf\u4e2d\u6240\u6709 PCI \u8bbe\u5907\u7684\u8be6\u7ec6\u4fe1\u606f\uff08\u542b\u8bbe\u5907\u578b\u53f7\u3001\u9a71\u52a8\u7b49\uff09\nlsusb # \u67e5\u770b\u7cfb\u7edf\u4e2d\u5df2\u8fde\u63a5\u7684\u6240\u6709 USB \u8bbe\u5907\uff08\u5982 U \u76d8\u3001\u9f20\u6807\u3001\u952e\u76d8\u7b49\uff09\nlsusb -v # \u67e5\u770b\u7cfb\u7edf\u4e2d\u5df2\u8fde\u63a5 USB \u8bbe\u5907\u7684\u8be6\u7ec6\u4fe1\u606f\uff08\u542b\u8bbe\u5907 ID\u3001\u5382\u5546\u4fe1\u606f\u7b49\uff09\nlsmod # \u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u4e2d\u5df2\u52a0\u8f7d\u7684\u5185\u6838\u6a21\u5757\uff08\u5373\u5df2\u542f\u7528\u7684\u786c\u4ef6\u9a71\u52a8\u7a0b\u5e8f\uff09<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>4\u3001\u5f52\u6863\u3001\u538b\u7f29<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>zip liuyazhuang.zip myfile # \u5c06 myfile \u6587\u4ef6\u538b\u7f29\u4e3a liuyazhuang.zip\uff08\u683c\u5f0f\uff1azip \u538b\u7f29\u540e\u7684\u6587\u4ef6\u540d \u539f\u6587\u4ef6\uff09\nunzip liuyazhuang.zip # \u89e3\u538b liuyazhuang.zip \u538b\u7f29\u6587\u4ef6\ngzip \u6587\u4ef6\u540d # \u538b\u7f29\u6307\u5b9a\u6307\u5b9a\u6587\u4ef6\uff08\u538b\u7f29\u540e\u539f\u6587\u4ef6\u4f1a\u88ab\u5220\u9664\uff0c\u751f\u6210.gz \u540e\u7f00\u7684\u538b\u7f29\u6587\u4ef6\uff09\ntar -cvf out.tar liuyazhuang # \u5c06\u6587\u4ef6 &quot;liuyazhuang&quot; \u6253\u5305\u6210\u5f52\u6863\u6587\u4ef6 out.tar\uff08-c\uff1a\u521b\u5efa\u65b0\u5f52\u6863\uff1b-v\uff1a\u663e\u793a\u8fc7\u7a0b\uff1b-f\uff1a\u6307\u5b9a\u6587\u4ef6\u540d\uff09\ntar -xvf liuyazhuang.tar # \u91ca\u653e liuyazhuang.tar \u5f52\u6863\u6587\u4ef6\uff08-x\uff1a\u89e3\u5f00\u5f52\u6863\uff09\ntar -cvzf backup.tar.gz\/etc # \u5c06 \/etc \u76ee\u5f55\u6253\u5305\u5e76\u901a\u8fc7 gzip \u538b\u7f29\u4e3a backup.tar.gz\uff08-z\uff1a\u8c03\u7528 gzip \u538b\u7f29\uff09\ntar -cvf test.tar * # \u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u6253\u5305\u6210 test.tar\uff08\u9700\u624b\u52a8\u6dfb\u52a0.tar \u6269\u5c55\u540d\uff09\ntar -zcvf test.tar.gz * # \u5c06\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u6253\u5305\u5e76\u901a\u8fc7 gzip \u538b\u7f29\u4e3a test.tar.gz\ntar -tf test.tar # \u67e5\u770b test.tar \u5f52\u6863\u6587\u4ef6\u4e2d\u5305\u542b\u7684\u6240\u6709\u6587\u4ef6\uff08-t\uff1a\u67e5\u770b\u5185\u5bb9\uff09\ntar -xvf test.tar # \u89e3\u5f00 test.tar \u5f52\u6863\u6587\u4ef6\ntar -zxvf foo.tar.gz # \u89e3\u538b\u5e76\u89e3\u5f00 foo.tar.gz \u538b\u7f29\u5f52\u6863\u6587\u4ef6\ngzip test.txt # \u538b\u7f29 test.txt \u6587\u4ef6\uff08\u65e0\u9700\u989d\u5916\u53c2\u6570\uff0c\u538b\u7f29\u540e\u751f\u6210 test.txt.gz\uff09\ngzip -l test.txt.gz # \u663e\u793a test.txt.gz \u538b\u7f29\u6587\u4ef6\u7684\u538b\u7f29\u7387\u4fe1\u606f<\/pre><\/div>\n\n\n\n<p><\/p>\n\n\n\n<p>6\u3001\u67e5\u627e<\/p>\n\n\n\n<div class=\"wp-block-codemirror-blocks-code-block code-block\"><pre>locate keyword # \u5feb\u901f\u67e5\u627e\u540d\u79f0\u5305\u542b keyword \u7684\u6587\u4ef6\u6216\u6587\u4ef6\u5939\uff08\u9700\u4f9d\u8d56\u9884\u5148\u5efa\u7acb\u7684\u6570\u636e\u5e93\uff09\nupdatedb # \u624b\u5de5\u5efa\u7acb\u6216\u66f4\u65b0 locate \u547d\u4ee4\u6240\u9700\u7684\u6570\u636e\u5e93\uff08\u9ed8\u8ba4\u6bcf\u5929\u81ea\u52a8\u66f4\u65b0\uff09\nfind . -name liuyazhuang # \u67e5\u627e\u5f53\u524d\u76ee\u5f55\u4e0b\u540d\u79f0\u4e2d\u542b\u6709 &quot;liuyazhuang&quot; \u7684\u6587\u4ef6\nfind \/-name *.conf # \u67e5\u627e\u6839\u76ee\u5f55\u4e0b\uff08\u6574\u4e2a\u786c\u76d8\uff09\u6240\u6709\u540e\u7f00\u4e3a.conf \u7684\u6587\u4ef6\nfind \/-perm 777 # \u67e5\u627e\u7cfb\u7edf\u4e2d\u6240\u6709\u6743\u9650\u4e3a 777 \u7684\u6587\u4ef6\nfind \/-type d # \u8fd4\u56de\u6839\u76ee\u5f55\u4e0b\u6240\u6709\u7684\u76ee\u5f55\nfind . -name &quot;a*&quot; -exec ls -l {} ; # \u67e5\u627e\u5f53\u524d\u76ee\u5f55\u4e0b\u540d\u79f0\u4ee5 &quot;a&quot; \u5f00\u5934\u7684\u6587\u4ef6\uff0c\u5e76\u6267\u884c ls -l \u547d\u4ee4\u663e\u793a\u8be6\u7ec6\u4fe1\u606f\nfind \/-name httpd.conf # \u641c\u7d22\u7cfb\u7edf\u6839\u76ee\u5f55\u4e0b\u540d\u4e3a httpd.conf \u7684\u6587\u4ef6\nctrl+c # \u5feb\u6377\u952e\uff1a\u7ec8\u6b62\u5f53\u524d\u6b63\u5728\u6267\u884c\u7684\u547d\u4ee4\nwho # \u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u4e2d\u767b\u5f55\u7684\u7528\u6237\u4fe1\u606f\nw # \u67e5\u770b\u5f53\u524d\u7cfb\u7edf\u4e2d\u767b\u5f55\u7684\u7528\u6237\u4fe1\u606f\uff08\u6bd4 who \u66f4\u8be6\u7ec6\uff0c\u5305\u542b\u7528\u6237\u6d3b\u52a8\uff09\ndmesg # \u663e\u793a\u7cfb\u7edf\u8bca\u65ad\u4fe1\u606f\uff08\u5305\u62ec\u64cd\u4f5c\u7cfb\u7edf\u7248\u672c\u3001\u7269\u7406\u5185\u5b58\u5927\u5c0f\u7b49\uff09\ndf # \u67e5\u770b\u6587\u4ef6\u7cfb\u7edf\u5404\u5206\u533a\u7684\u7a7a\u95f4\u5360\u7528\u60c5\u51b5\ndu [\u53c2\u6570] &lt; \u76ee\u5f55\u540d &gt; # \u67e5\u770b\u6307\u5b9a\u76ee\u5f55\u4e2d\u5404\u7ea7\u5b50\u76ee\u5f55\u6240\u4f7f\u7528\u7684\u786c\u76d8\u7a7a\u95f4\nfree # \u67e5\u770b\u7cfb\u7edf\u5185\u5b58\u53ca\u865a\u62df\u5185\u5b58\uff08\u4ea4\u6362\u7a7a\u95f4\uff09\u7684\u5927\u5c0f\u548c\u5360\u7528\u60c5\u51b5<\/pre><\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u57fa\u672c\u547d\u4ee4 2\u3001\u5173\u673a 3\u3001\u6587\u4ef6\u548c\u76ee\u5f55  [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":509,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[9],"tags":[],"class_list":["post-508","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-9"],"_links":{"self":[{"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/posts\/508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/comments?post=508"}],"version-history":[{"count":4,"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/posts\/508\/revisions"}],"predecessor-version":[{"id":513,"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/posts\/508\/revisions\/513"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/media\/509"}],"wp:attachment":[{"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/media?parent=508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/categories?post=508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cqchen86.cn\/index.php\/wp-json\/wp\/v2\/tags?post=508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}