{"id":5269,"date":"2020-05-16T09:32:00","date_gmt":"2020-05-16T01:32:00","guid":{"rendered":"https:\/\/www.ldhost.cn\/jc\/?p=5269"},"modified":"2020-03-22T10:51:26","modified_gmt":"2020-03-22T02:51:26","slug":"linux%e6%9c%8d%e5%8a%a1%e5%99%a8%e8%bf%90%e7%bb%b4%e5%b8%b8%e7%94%a8%e5%91%bd%e4%bb%a4%e5%88%97%e8%a1%a8","status":"publish","type":"post","link":"https:\/\/www.ldhost.cn\/jc\/linux\/5269.html","title":{"rendered":"Linux\u670d\u52a1\u5668\u8fd0\u7ef4\u5e38\u7528\u547d\u4ee4\u5217\u8868"},"content":{"rendered":"\n<p>\u6bcf\u65f6\u6bcf\u523b\uff0c\u6211\u4eec\u90fd\u9700\u8981\u53c2\u8003\u67d0\u79cdLinux\u547d\u4ee4\u5217\u8868\u3002\u4e5f\u8bb8\u60a8\u662f\u4e00\u540d<a href=\"https:\/\/www.ldhost.cn\/vps.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"\u670d\u52a1\u5668\uff08\u5728\u65b0\u7a97\u53e3\u6253\u5f00\uff09\">\u670d\u52a1\u5668<\/a>\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u6b63\u5728\u9010\u6b65\u5b8c\u6210\u4efb\u52a1\uff0c\u7a81\u7136\u95f4\u60a8\u8111\u7b4b\u6025\u8f6c\u5f2f\u3002\u6216\u8005\uff0c\u4e5f\u8bb8\u60a8\u662f\u901a\u8fc7Linux\u5b66\u4e60\u7684\u521d\u5b66\u8005\uff0c\u8fd9\u91cc\u6709\u4e00\u4e9b\u6709\u7528\u7684Linux\u547d\u4ee4\uff01 <\/p>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>1 \u2013\u67e5\u770b\u670d\u52a1\u5668\u7cfb\u7edf\u4fe1\u606f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u663e\u793aLinux\u7cfb\u7edf\u4fe1\u606f\nuname -a \n\n\uff03\u663e\u793a\u5185\u6838\u53d1\u884c\u4fe1\u606f\nuname -r \n\n\uff03\u663e\u793a\u5b89\u88c5\u4e86\u54ea\u4e2a\u7248\u672c\u7684redhat\ncat \/etc\/redhat-release \n\n\uff03\u663e\u793a\u7cfb\u7edf\u5df2\u8fd0\u884c\u4e86\u591a\u957f\u65f6\u95f4\nuptime \n\n\uff03\u663e\u793a\u7cfb\u7edf\u4e3b\u673a\u540d\nhostname \n\n\uff03\u663e\u793a\u4e3b\u673a\u7684IP\u5730\u5740\nhostname -I \n\n\uff03\u663e\u793a\u7cfb\u7edf\u91cd\u542f\u5386\u53f2\n last reboot \n\n\uff03\u663e\u793a\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4\ndate \n\n\uff03\u663e\u793a\u672c\u6708\u7684\u65e5\u5386\ncal \n\n\uff03\u663e\u793a\u8c01\u5728\u7ebf\nw\n\n\uff03\u60a8\u4ee5\u8c01\u8eab\u4efd\u767b\u5f55\nwhoami <\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>2 \u2013\u670d\u52a1\u5668\u786c\u4ef6\u4fe1\u606f<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u5728\u5185\u6838\u7f13\u51b2\u533a\u4e2d\u663e\u793a\u6d88\u606f\ndmesg\n\n\uff03\u663e\u793aCPU\u4fe1\u606f\ncat \/proc\/cpuinfo \n\n\uff03\u663e\u793a\u5185\u5b58\u4fe1\u606f\n cat \/proc\/meminfo \n\n\uff03\u663e\u793a\u53ef\u7528\u548c\u5df2\u7528\u7684\u5185\u5b58\uff08-h\u8868\u793a\u53ef\u8bfb\uff0c-m\u8868\u793aMB\uff0c-g\u8868\u793aGB\u3002\uff09\n free -h \n\n\uff03\u663e\u793aPCI\u8bbe\u5907\n lspci -tv \n\n\uff03\u663e\u793aUSB\u8bbe\u5907\n lsusb -tv \n\n\uff03\u4eceBIOS\u663e\u793aDMI \/ SMBIOS\uff08\u786c\u4ef6\u4fe1\u606f\uff09\n dmidecode \n\n\uff03\u663e\u793a\u6709\u5173\u78c1\u76d8sda\u7684\u4fe1\u606f\n hdparm -i \/dev\/sda \n\n\uff03\u5728\u78c1\u76d8sda\u4e0a\u6267\u884c\u8bfb\u53d6\u901f\u5ea6\u6d4b\u8bd5\n hdparm -tT \/dev\/sda \n\n\uff03\u6d4b\u8bd5\u78c1\u76d8sda\u4e0a\u7684\u4e0d\u53ef\u8bfb\u5757\n badblocks -s \/dev\/sda <\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>3 \u2013\u670d\u52a1\u5668\u76d1\u63a7\u548c\u7edf\u8ba1<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u663e\u793a\u8d44\u6e90\u5360\u7528\u548c\u8fdb\u7a0b\n top \n\n\uff03\u4e92\u52a8\u5f0f\u8fdb\u7a0b\u67e5\u770b\u5668\uff08\u66ff\u4ee3\u65b9\u6848\uff09\n htop \n\n\uff03\u663e\u793a\u5904\u7406\u5668\u76f8\u5173\u7edf\u8ba1\u4fe1\u606f\n mpstat 1 \n\n\uff03\u663e\u793a\u5185\u5b58\u7edf\u8ba1\u4fe1\u606f\n vmstat 1 \n\n\uff03\u663e\u793aI \/ O\u7edf\u8ba1\u4fe1\u606f\n iostat 1 \n\n\uff03\u663e\u793a\u6700\u540e100\u6761\u7cfb\u7edf\u65e5\u5fd7\u6d88\u606f\uff08\u5bf9\u4e8eDebian\u7684\u7cfb\u7edf\u4f7f\u7528 \/var\/log\/syslog \uff09\n tail 100 \/var\/log\/messages \n\n\uff03\u5728\u63a5\u53e3eth0\u4e0a\u6355\u83b7\u5e76\u663e\u793a\u6240\u6709\u62a5\u6587\n tcpdump -i eth0 \n\n\uff03\u76d1\u89c6\u7aef\u53e380\uff08HTTP\uff09\u4e0a\u7684\u6240\u6709\u6d41\u91cf\n tcpdump -i eth0 'port 80' \n\n\uff03\u5217\u51fa\u7cfb\u7edf\u4e0a\u6240\u6709\u6253\u5f00\u7684\u6587\u4ef6\n lsof \n\n\uff03\u5217\u51fa\u7528\u6237\u6253\u5f00\u7684\u6587\u4ef6\n lsof -u user \n\n\uff03\u663e\u793a\u53ef\u7528\u548c\u5df2\u7528\u7684\u5185\u5b58\uff08-h\u8868\u793a\u53ef\u8bfb\uff0c-m\u8868\u793aMB\uff0c-g\u8868\u793aGB\u3002\uff09\n free -h \n\n\uff03\u6267\u884c\u201c df -h\u201d\uff0c\u663e\u793a\u5b9a\u671f\u66f4\u65b0\n watch df -h <\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>4 \u2013\u7528\u6237\u4fe1\u606f\u548c\u7ba1\u7406<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u663e\u793a\u5f53\u524d\u7528\u6237\u7684\u7528\u6237\u540d\u548c\u7ec4ID\u3002\nid\n\n\uff03\u663e\u793a\u6700\u8fd1\u767b\u5f55\u7cfb\u7edf\u7684\u7528\u6237\u3002\nlast \n\n\uff03\u663e\u793a\u8c01\u767b\u5f55\u7cfb\u7edf\u3002\nwho\n\n\uff03\u663e\u793a\u8c01\u767b\u5f55\u4ee5\u53ca\u4ed6\u4eec\u5728\u505a\u4ec0\u4e48\u3002\nw\n\n\uff03\u521b\u5efa\u4e00\u4e2a\u540d\u4e3a\u201c test\u201d\u7684\u7ec4\u3002\n groupadd test \n\n\uff03\u521b\u5efa\u4e00\u4e2a\u540d\u4e3awang\u7684\u5e10\u6237\uff0c\u5176\u6ce8\u91ca\u4e3a\u201c wang lin\u201d\uff0c\u5e76\u521b\u5efa\u7528\u6237\u7684\u4e3b\u76ee\u5f55\u3002\n useradd -c \"wang ;in\" -m wang \n\n\uff03\u5220\u9664wang\u5e10\u53f7\u3002\n userdel wang\n\n\uff03\u5c06wang\u5e10\u6237\u6dfb\u52a0\u5230\u9500\u552e\u7ec4\n usermod -aG sales wang<\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>5 \u2013\u6587\u4ef6\u548c\u76ee\u5f55\u547d\u4ee4<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u4ee5\u957f\u5217\u8868\uff08\u8be6\u7ec6\uff09\u683c\u5f0f\u5217\u51fa\u6240\u6709\u6587\u4ef6\n ls -al \n\n\uff03\u663e\u793a\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\npwd\n\n\uff03\u521b\u5efa\u4e00\u4e2a\u76ee\u5f55\n mkdir \u76ee\u5f55\u540d\n\n\uff03\u5220\u9664\uff08\u5220\u9664\uff09\u6587\u4ef6\n rm \u6587\u4ef6\u540d \n\n\uff03\u9012\u5f52\u5220\u9664\u76ee\u5f55\u53ca\u5176\u5185\u5bb9\n rm -r  \u76ee\u5f55\u540d  \n\n\uff03\u5f3a\u5236\u5220\u9664\u6587\u4ef6\u800c\u4e0d\u63d0\u793a\u60a8\u8fdb\u884c\u786e\u8ba4\n rm -f  \u6587\u4ef6\u540d \n\n\uff03\u5f3a\u5236\u9012\u5f52\u5220\u9664\u76ee\u5f55\n rm -rf \u76ee\u5f55\u540d\n\n\uff03\u5c06file1\u590d\u5236\u5230file2\ncp file1 file2\n\n\uff03\u5c06source_directory\u9012\u5f52\u590d\u5236\u5230\u76ee\u6807\u3002\u5982\u679c\u5b58\u5728\u76ee\u6807\uff0c\u5219\u5c06source_directory\u590d\u5236\u5230\u76ee\u6807\uff0c\u5426\u5219\u4f7f\u7528source_directory\u7684\u5185\u5bb9\u521b\u5efa\u76ee\u6807\u3002\n cp -r source_directory destination \n\n\uff03\u5c06\u6587\u4ef61\u91cd\u547d\u540d\u6216\u79fb\u52a8\u5230\u6587\u4ef62\u3002\u5982\u679cfile2\u662f\u73b0\u6709\u76ee\u5f55\uff0c\u8bf7\u5c06file1\u79fb\u81f3\u76ee\u5f55file2\nmv file1 file2\n\n\uff03\u521b\u5efa\u6307\u5411\u94fe\u63a5\u540d\u7684\u7b26\u53f7\u94fe\u63a5\n ln -s \/path\/to\/file linkname \n\n\uff03\u521b\u5efa\u4e00\u4e2a\u7a7a\u6587\u4ef6\u6216\u66f4\u65b0\u6587\u4ef6\u7684\u8bbf\u95ee\u548c\u4fee\u6539\u65f6\u95f4\u3002\n touch file \n\n\uff03\u67e5\u770b\u6587\u4ef6\u5185\u5bb9\n cat file \n\n\uff03\u6d4f\u89c8\u6587\u672c\u6587\u4ef6\n less file \n\n\uff03\u663e\u793a\u6587\u4ef6\u7684\u524d10\u884c\n head file \n\n\uff03\u663e\u793a\u6587\u4ef6\u7684\u6700\u540e10\u884c\n tail file \n\n\uff03\u663e\u793a\u6587\u4ef6\u7684\u6700\u540e10\u884c\uff0c\u5e76\u5728\u6587\u4ef6\u589e\u957f\u65f6\u201c\u8ddf\u968f\u201d\u6587\u4ef6\u3002\n tail -f file <\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>6 \u2013\u8fc7\u7a0b\u7ba1\u7406<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u663e\u793a\u60a8\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u8fdb\u7a0b\nps\n\n\uff03\u663e\u793a\u7cfb\u7edf\u4e0a\u5f53\u524d\u6b63\u5728\u8fd0\u884c\u7684\u6240\u6709\u8fdb\u7a0b\u3002\n ps -ef \n\n\uff03\u663e\u793a\u8fdb\u7a0b\u540d\u79f0\u7684\u8fdb\u7a0b\u4fe1\u606f\n ps -ef | grep processname \n\n\uff03\u663e\u793a\u548c\u7ba1\u7406\u6700\u91cd\u8981\u7684\u8fdb\u7a0b\n top \n\n\uff03\u4e92\u52a8\u5f0f\u8fdb\u7a0b\u67e5\u770b\u5668\uff08\u66ff\u4ee3\u65b9\u6848\uff09\n htop \n\n\uff03\u7ec8\u6b62\u8fdb\u7a0bID\u4e3apid\u7684\u8fdb\u7a0b\n kill pid \n\n\uff03\u6740\u6b7b\u6240\u6709\u540d\u4e3aprocessname\u7684\u8fdb\u7a0b\nkillall processname \n\n\uff03\u5728\u540e\u53f0\u542f\u52a8\u7a0b\u5e8f\nprogram &amp; \n\n\uff03\u663e\u793a\u505c\u6b62\u6216\u540e\u53f0\u4f5c\u4e1a\nbg \n\n\uff03\u5c06\u6700\u65b0\u7684\u540e\u53f0\u4f5c\u4e1a\u5e26\u5230\u524d\u53f0\nfg\n\n\uff03\u5c06\u5de5\u4f5cn\u5e26\u5230\u524d\u53f0\nfg n <\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>7 \u2013\u6587\u4ef6\u6743\u9650<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> &nbsp; &nbsp; \u6743\u9650\u793a\u4f8b\n\n&nbsp; &nbsp; &nbsp; &nbsp; rwx rwx rwx chmod 777\u6587\u4ef6\u540d\n&nbsp; &nbsp; &nbsp; &nbsp; rwx rwx rx chmod 775\u6587\u4ef6\u540d\n&nbsp; &nbsp; &nbsp; &nbsp; rwx rx rx chmod 755\u6587\u4ef6\u540d\n&nbsp; &nbsp; &nbsp; &nbsp; rw- rw- r-- chmod 664\u6587\u4ef6\u540d\n&nbsp; &nbsp; &nbsp; &nbsp; rw- r-- r-- chmod 644\u6587\u4ef6\u540d\n\n\uff03\u6ce8\u610f\uff1a\u8bf7\u8c28\u614e\u4f7f\u7528777\uff01\n\n&nbsp; &nbsp; &nbsp; &nbsp; U =\u7528\u6237\n&nbsp; &nbsp; &nbsp; &nbsp; G =\u7ec4\n\n&nbsp; &nbsp; &nbsp; &nbsp; r =\u8bfb\u53d6\n&nbsp; &nbsp; &nbsp; &nbsp; w =\u5199\n&nbsp; &nbsp; &nbsp; &nbsp; x =\u6267\u884c\n&nbsp; &nbsp; &nbsp; &nbsp; -=\u65e0\u6cd5\u8bbf\u95ee<\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>8 \u2013\u7f51\u7edc<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u663e\u793a\u6240\u6709\u7f51\u7edc\u63a5\u53e3\u548cIP\u5730\u5740\nifconfig -a\n\n\uff03\u663e\u793aeth0\u7684\u5730\u5740\u548c\u8be6\u7ec6\u4fe1\u606f\nifconfig eth0\n\n\uff03\u67e5\u8be2\u6216\u63a7\u5236\u7f51\u7edc\u9a71\u52a8\u7a0b\u5e8f\u548c\u786c\u4ef6\u8bbe\u7f6e\nethtool eth0\n\n\uff03\u53d1\u9001ICMP\u56de\u663e\u8bf7\u6c42\u5230\u4e3b\u673a\n ping host \n\n\uff03\u663e\u793a\u57df\u7684Whois\u4fe1\u606f\n whois domain \n\n\uff03\u663e\u793a\u57df\u7684DNS\u4fe1\u606f\n dig domain \n\n\uff03\u53cd\u5411\u67e5\u8be2IP_ADDRESS\n dig -x IP_ADDRESS \n\n\uff03\u663e\u793a\u57df\u7684DNS IP\u5730\u5740\n host domain \n\n\uff03\u663e\u793a\u4e3b\u673a\u540d\u7684\u7f51\u7edc\u5730\u5740\u3002\n hostname -i \n\n\uff03\u663e\u793a\u6240\u6709\u672c\u5730IP\u5730\u5740\n hostname -I \n\n\uff03\u4e0b\u8f7dhttp:\/\/domain.com\/file\n wget http:\/\/domain.com\/file \n\n\uff03\u663e\u793a\u76d1\u542c\u7684tcp\u548cudp\u7aef\u53e3\u4ee5\u53ca\u5bf9\u5e94\u7684\u7a0b\u5e8f\n netstat -nutlp <\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>9 \u2013\u6863\u6848\uff08TAR\u6587\u4ef6\uff09<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u521b\u5efa\u5305\u542b\u76ee\u5f55\u7684tar\u6587\u4ef6\u540d\u4e3aarchive.tar\u3002\n tar cf archive.tar directory \n\n\uff03\u4ecearchive.tar\u4e2d\u63d0\u53d6\u5185\u5bb9\u3002\n tar xf archive.tar \n\n\uff03\u521b\u5efa\u4e00\u4e2agzip\u538b\u7f29\u7684tar\u6587\u4ef6\uff0c\u540d\u79f0\u4e3aarchive.tar.gz\u3002\n tar czf archive.tar.gz directory \n\n\uff03\u63d0\u53d6gzip\u538b\u7f29\u7684tar\u6587\u4ef6\u3002\n tar xzf archive.tar.gz \n\n\uff03\u4f7f\u7528bzip2\u538b\u7f29\u521b\u5efa\u4e00\u4e2atar\u6587\u4ef6\n tar cjf archive.tar.bz2 directory \n\n\uff03\u63d0\u53d6\u4e00\u4e2abzip2\u538b\u7f29\u7684tar\u6587\u4ef6\u3002\n tar xjf archive.tar.bz2 <\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>10 \u2013\u5b89\u88c5\u5305<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u6309\u5173\u952e\u5b57\u641c\u7d22\u8f6f\u4ef6\u5305\u3002\n yum search keyword \n\n\uff03\u5b89\u88c5\u8f6f\u4ef6\u5305\u3002\n yum install package \n\n\uff03\u663e\u793a\u8f6f\u4ef6\u5305\u7684\u63cf\u8ff0\u548c\u6458\u8981\u4fe1\u606f\u3002\n yum info package \n\n\uff03\u4ece\u540d\u4e3apackage.rpm\u7684\u672c\u5730\u6587\u4ef6\u5b89\u88c5\u8f6f\u4ef6\u5305\n rpm -i package.rpm \n\n\uff03\u5220\u9664\/\u5378\u8f7d\u8f6f\u4ef6\u5305\u3002\n yum remove package \n\n\uff03\u4ece\u6e90\u4ee3\u7801\u5b89\u88c5\u8f6f\u4ef6\u3002\ntar zxvf sourcecode.tar.gz \ncd sourcecode \n.\/configure make \nmake install <\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>11 \u2013\u641c\u7d22<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u641c\u7d22\u6587\u4ef6\u4e2d\u7684\u56fe\u6848\n grep pattern file \n\n\uff03\u9012\u5f52\u641c\u7d22\u76ee\u5f55\u4e2d\u7684\u6a21\u5f0f\n grep -r pattern directory \n\n\uff03\u6309\u540d\u79f0\u67e5\u627e\u6587\u4ef6\u548c\u76ee\u5f55\n locate name \n\n\uff03\u5728\/ home \/ john\u4e2d\u67e5\u627e\u4ee5\u201c\u524d\u7f00\u201d\u5f00\u5934\u7684\u6587\u4ef6\u3002\n find \/home\/john -name 'prefix*' \n\n\uff03\u5728\/ home\u4e2d\u67e5\u627e\u5927\u4e8e100MB\u7684\u6587\u4ef6\n find \/home -size +100M <\/pre>\n\n\n\n<p class=\"has-text-color has-vivid-cyan-blue-color\"><strong>12 \u2013 SSH\u767b\u5f55\u3001\u6587\u4ef6\u4f20\u8f93\u3001\u78c1\u76d8\u4f7f\u7528\u3001\u76ee\u5f55\u5bfc\u822a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\uff03\u8fde\u63a5\u5230\u4e3b\u673a\u4f5c\u4e3a\u60a8\u7684\u672c\u5730\u7528\u6237\u540d\u3002\n ssh host \n\n\uff03\u4ee5\u7528\u6237\u8eab\u4efd\u8fde\u63a5\u5230\u4e3b\u673a\n ssh user@host \n\n\uff03\u4f7f\u7528\u7aef\u53e3\u8fde\u63a5\u5230\u4e3b\u673a\n ssh -p port user@host \n\n \uff03\u5c06file.txt\u590d\u5236\u5230\u670d\u52a1\u5668\u4e0a\u7684\/ tmp\u6587\u4ef6\u5939\u4e2d\n\n  scp file.txt server:\/tmp \n \n \uff03\u5c06* .html\u6587\u4ef6\u4ece\u670d\u52a1\u5668\u590d\u5236\u5230\u672c\u5730\/ tmp\u6587\u4ef6\u5939\u3002\n\n  scp server:\/var\/www\/*.html \/tmp \n \n \uff03\u5c06\u6240\u6709\u6587\u4ef6\u548c\u76ee\u5f55\u4ece\u670d\u52a1\u5668\u9012\u5f52\u590d\u5236\u5230\u5f53\u524d\u7cfb\u7edf\u7684\/ tmp\u6587\u4ef6\u5939\u4e2d\u3002\n\n scp -r server:\/var\/www \/tmp \n \n \uff03\u5c06\/ home\u540c\u6b65\u5230\/ backups \/ home\n\n  rsync -a \/home \/backups\/ \n \n \uff03\u5728\u542f\u7528\u538b\u7f29\u7684\u60c5\u51b5\u4e0b\u5728\u672c\u5730\u548c\u8fdc\u7a0b\u7cfb\u7edf\u4e4b\u95f4\u540c\u6b65\u6587\u4ef6\/\u76ee\u5f55\n\n rsync -avz \/home server:\/backups\/ \n\n \uff03\u663e\u793a\u5df2\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u4e0a\u7684\u53ef\u7528\u7a7a\u95f4\u548c\u5df2\u7528\u7a7a\u95f4\n\n  df -h \n \n \uff03\u663e\u793a\u5df2\u6302\u8f7d\u6587\u4ef6\u7cfb\u7edf\u4e0a\u7684\u7a7a\u95f2\u548c\u5df2\u4f7f\u7528\u7684inode\n\n df -i\n \n \uff03\u663e\u793a\u78c1\u76d8\u5206\u533a\u7684\u5927\u5c0f\u548c\u7c7b\u578b\n\n fdisk -l \n \n \uff03\u4ee5\u53ef\u8bfb\u683c\u5f0f\u663e\u793a\u6240\u6709\u6587\u4ef6\u548c\u76ee\u5f55\u7684\u78c1\u76d8\u4f7f\u7528\u60c5\u51b5\n\n  du -ah \n \n \uff03\u663e\u793a\u5f53\u524d\u76ee\u5f55\u4e0b\u7684\u78c1\u76d8\u603b\u4f7f\u7528\u91cf\n\n  du -sh \n\n \uff03\u5411\u4e0a\u4e00\u7ea7\u76ee\u5f55\u6811\uff08\u8f6c\u5230\u7236\u76ee\u5f55\u3002\uff09\n\n cd .. \n\n \n \uff03\u8fdb\u5165$HOME\u76ee\u5f55\n\n cd home\n\n \n \uff03\u8f6c\u5230\/ etc\u76ee\u5f55\n\n  cd \/etc <\/pre>\n<div><img decoding=\"async\" src=\"https:\/\/www.ldhost.cn\/images\/ad-845-3.png\" alt=\"\u56fe\u7247\u63cf\u8ff0\" \/><\/div>","protected":false},"excerpt":{"rendered":"<p>\u6bcf\u65f6\u6bcf\u523b\uff0c\u6211\u4eec\u90fd\u9700\u8981\u53c2\u8003\u67d0\u79cdLinux\u547d\u4ee4\u5217\u8868\u3002\u4e5f\u8bb8\u60a8\u662f\u4e00\u540d\u670d\u52a1\u5668\u7cfb\u7edf\u7ba1\u7406\u5458\uff0c\u6b63\u5728\u9010\u6b65\u5b8c\u6210\u4efb\u52a1\uff0c\u7a81\u7136\u95f4\u60a8\u8111\u7b4b\u6025\u8f6c\u5f2f\u3002\u6216\u8005\uff0c\u4e5f\u8bb8\u60a8\u662f\u901a\u8fc7Linux\u5b66\u4e60\u7684\u521d\u5b66\u8005\uff0c\u8fd9\u91cc\u6709\u4e00\u4e9b\u6709\u7528\u7684Linux\u547d\u4ee4\uff01 1 \u2013\u67e5\u770b\u670d\u52a1\u5668\u7cfb\u7edf\u4fe1\u606f \uff03\u663e\u793aLinux\u7cfb\u7edf\u4fe1\u606f uname -a \uff03\u663e\u793a\u5185\u6838\u53d1\u884c\u4fe1\u606f uname -r \uff03\u663e\u793a\u5b89\u88c5\u4e86\u54ea\u4e2a\u7248\u672c\u7684redhat cat \/etc\/redhat-release \uff03\u663e\u793a\u7cfb\u7edf\u5df2\u8fd0\u884c\u4e86\u591a\u957f\u65f6\u95f4 uptime \uff03\u663e\u793a\u7cfb\u7edf\u4e3b\u673a\u540d hostname \uff03\u663e\u793a\u4e3b\u673a\u7684IP\u5730\u5740 hostname -I \uff03\u663e\u793a\u7cfb\u7edf\u91cd\u542f\u5386\u53f2 last reboot \uff03\u663e\u793a\u5f53\u524d\u65e5\u671f\u548c\u65f6\u95f4 date \uff03\u663e\u793a\u672c\u6708\u7684\u65e5\u5386&#8230; <a href=\"https:\/\/www.ldhost.cn\/jc\/linux\/5269.html\" class=\"readmore\">\u9605\u8bfb\u5168\u6587<span class=\"screen-reader-text\">Linux\u670d\u52a1\u5668\u8fd0\u7ef4\u5e38\u7528\u547d\u4ee4\u5217\u8868<\/span><span class=\"fa fa-angle-double-right\" aria-hidden=\"true\"><\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[96],"tags":[],"class_list":["post-5269","post","type-post","status-publish","format-standard","hentry","category-linux","content-layout-excerpt-thumb"],"_links":{"self":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/5269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/comments?post=5269"}],"version-history":[{"count":6,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/5269\/revisions"}],"predecessor-version":[{"id":5279,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/posts\/5269\/revisions\/5279"}],"wp:attachment":[{"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/media?parent=5269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/categories?post=5269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ldhost.cn\/jc\/wp-json\/wp\/v2\/tags?post=5269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}