whereis Java\n<\/code><\/pre>\n<\/p>\ncat<\/p>\n
cat\u547d\u4ee4\u8054\u63a5\u6587\u4ef6\u5e76\u590d\u5370\u5230\u6807\u51c6\u8f93\u51fa\u8bbe\u5907\u4e0a\uff0ccat\u65f6\u5e38\u62ff\u6765\u663e\u793a\u6587\u4ef6\u7684\u5185\u5bb9<\/p>\n
\u987b\u8981\u6ce8\u610f\u7684\u662f\uff1a\u5f53\u6587\u4ef6\u8f83\u5927\u65f6\uff0c\u6587\u672c\u5728\u5c4f\u5e55\u4e0a\u8fc5\u901f\u63a0\u8fc7\uff08\u6eda\u5c4f\uff09\uff0c\u7528\u6237\u5e38\u5e38\u770b\u4e0d\u6e05\u6240\u663e\u793a\u7684\u5185\u5bb9\u3002\u56e0\u800cqq for linux\uff0c\u901a\u5e38\u7528more\u7b49\u547d\u4ee4\u5206\u5c4f\u663e\u793a\u3002<\/p>\n
\u5728\u5c4f\u5e55\u4e0a\u663e\u793a\u6587\u4ef6ml\u7684\u5185\u5bb9\uff0c\u5e76\u663e\u793a\u884c\u53f7<\/p>\n
\n
cat -n m1\n<\/code><\/pre>\n<\/p>\n\u540c\u65f6\u663e\u793a\u6587\u4ef6ml\u548cm2\u7684\u5185\u5bb9<\/p>\n
\n
cat m1 m2\n<\/code><\/pre>\n<\/p>\n\u5c06\u6587\u4ef6ml\u548cm2\u5408\u5e76\u540e\u88c5\u5165\u6587\u4ef6file\u4e2d<\/p>\n
\n
cat m1 m2 > file \n<\/code><\/pre>\n<\/p>\n\u6ce8\u610f\uff1a>\u901a\u5e38\u662f\u5199\u5165\u7684\u610f\u601d\u3002<\/p>\n
chmod<\/p>\n
chmod\u547d\u4ee4\u62ff\u6765\u53d8\u66f4\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6743\u9650\u3002\u5728Linux\u7cfb\u7edf\u4e2d\uff0c\u6587\u4ef6\u6216\u76ee\u5f55\u6743\u9650\u7684\u63a7\u5236\u5206\u522b\u4ee5\u8bfb\u53d6\u3001\u5199\u5165\u3001\u6267\u884c3\u79cd\u901a\u5e38\u6743\u9650\u6765\u5206\u8fa8\u3002<\/p>\n
\n
\u6743\u9650\u8303\u56f4\u7684\u8868\u793a\u6cd5\u5982\u4e0b\uff1a\nu User\uff0c\u5373\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u62e5\u6709\u8005\uff1b\ng Group\uff0c\u5373\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u5c5e\u7fa4\u7ec4\uff1b\no Other\uff0c\u9664\u4e86\u6587\u4ef6\u6216\u76ee\u5f55\u62e5\u6709\u8005\u6216\u6240\u5c5e\u7fa4\u7ec4\u4e4b\u5916\uff0c\u5176\u4ed6\u7528\u6237\u7686\u5c5e\u4e8e\u8fd9\u4e2a\u8303\u56f4\uff1b\na All\uff0c\u5373\u5168\u90e8\u7684\u7528\u6237\uff0c\u5305\u542b\u62e5\u6709\u8005\uff0c\u6240\u5c5e\u7fa4\u7ec4\u4ee5\u53ca\u5176\u4ed6\u7528\u6237\uff1b\nr \u8bfb\u53d6\u6743\u9650\uff0c\u6570\u5b57\u4ee3\u53f7\u4e3a\u201c4\u201d;\nw \u5199\u5165\u6743\u9650\uff0c\u6570\u5b57\u4ee3\u53f7\u4e3a\u201c2\u201d\uff1b\nx \u6267\u884c\u6216\u5207\u6362\u6743\u9650\uff0c\u6570\u5b57\u4ee3\u53f7\u4e3a\u201c1\u201d\uff1b\n- \u4e0d\u5177\u4efb\u4f55\u6743\u9650\uff0c\u6570\u5b57\u4ee3\u53f7\u4e3a\u201c0\u201d\uff1b\ns \u7279\u6b8a\u529f\u80fd\u8bf4\u660e\uff1a\u53d8\u66f4\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6743\u9650\u3002\n<\/code><\/pre>\n<\/p>\n\u987b\u8981\u6ce8\u610f\u7684\u662f\uff1aLinux\u7528\u6237\u5206\u4e3a\uff1a\u62e5\u6709\u8005(User)\u3001\u7ec4\u7fa4(Group)\u3001\u5176\u4ed6\uff08other\uff09<\/p>\n
\u4e3a\u6587\u4ef6f01\u8bbe\u7f6e\u81ea\u5df1\u53ef\u4ee5\u6267\u884c\uff0c\u73ed\u59d4\u53ef\u4ee5\u5199<\/p>\n
<\/p>\n
\n
chmod u+x,g+w f01\u3000\u3000\u5165\u7684\u6743\u9650\nchmod u=rwx,g=rw,o=r f01\nchmod 764 f01\n<\/code><\/pre>\n<\/p>\n\u5bf9\u6587\u4ef6f01\u7684u,g,o\u90fd\u8bbe\u7f6e\u53ef\u6267\u884c\u5c5e\u6027<\/p>\n
\n
chmod a+x f01\n<\/code><\/pre>\n<\/p>\ntop<\/p>\n
top\u547d\u4ee4\u53ef\u4ee5\u5b9e\u65f6\u52a8\u6001\u5730\u67e5\u770b\u7cfb\u7edf\u7684\u6574\u4f53\u8fd0\u884c\u60c5\u51b5\uff0c\u662f\u4e00\u4e2a\u7efc\u5408\u4e86\u591a\u65b9\u4fe1\u606f\u68c0\u6d4b\u7cfb\u7edf\u6027\u80fd\u548c\u8fd0\u884c\u4fe1\u606f\u7684\u5b9e\u7528\u5de5\u5177\u3002<\/p>\n
\u5728top\u547d\u4ee4\u6267\u884c\u8fc7\u7a0b\u4e2d\u53ef\u4ee5\u4f7f\u7528\u7684\u4e00\u4e9b\u4ea4\u4e92\u547d\u4ee4\u3002\u8fd9\u79cd\u547d\u4ee4\u90fd\u662f\u5355\u5b57\u6bcd\u7684<\/p>\n
\n
h\uff1a\u663e\u793a\u5e2e\u52a9\u753b\u9762\uff0c\u7ed9\u51fa\u4e00\u4e9b\u7b80\u77ed\u7684\u547d\u4ee4\u603b\u7ed3\u8bf4\u660e\uff1b\nk\uff1a\u7ec8\u6b62\u4e00\u4e2a\u8fdb\u7a0b\uff1b\ni\uff1a\u5ffd\u7565\u95f2\u7f6e\u548c\u50f5\u6b7b\u8fdb\u7a0b\uff0c\u8fd9\u662f\u4e00\u4e2a\u5f00\u5173\u5f0f\u547d\u4ee4\uff1b\nq\uff1a\u9000\u51fa\u7a0b\u5e8f\uff1b\nr\uff1a\u91cd\u65b0\u5b89\u6392\u4e00\u4e2a\u8fdb\u7a0b\u7684\u4f18\u5148\u7ea7\u522b\uff1b\nS\uff1a\u5207\u6362\u5230\u7d2f\u8ba1\u6a21\u5f0f\uff1b\ns\uff1a\u6539\u53d8\u4e24\u6b21\u5237\u65b0\u4e4b\u95f4\u7684\u5ef6\u8fdf\u65f6\u95f4\uff08\u5355\u4f4d\u4e3as\uff09\uff0c\u5982\u679c\u6709\u5c0f\u6570\uff0c\u5c31\u6362\u7b97\u6210ms\u3002\u8f93\u51650\u503c\u5219\u7cfb\u7edf\u5c06\u4e0d\u65ad\u5237\u65b0\uff0c\u9ed8\u8ba4\u503c\u662f5s\uff1b\nf\u6216\u8005F\uff1a\u4ece\u5f53\u524d\u663e\u793a\u4e2d\u6dfb\u52a0\u6216\u8005\u5220\u9664\u9879\u76ee\uff1b\no\u6216\u8005O\uff1a\u6539\u53d8\u663e\u793a\u9879\u76ee\u7684\u987a\u5e8f\uff1b\nl\uff1a\u5207\u6362\u663e\u793a\u5e73\u5747\u8d1f\u8f7d\u548c\u542f\u52a8\u65f6\u95f4\u4fe1\u606f\uff1b\nm\uff1a\u5207\u6362\u663e\u793a\u5185\u5b58\u4fe1\u606f\uff1b\nt\uff1a\u5207\u6362\u663e\u793a\u8fdb\u7a0b\u548cCPU\u72b6\u6001\u4fe1\u606f\uff1b\nc\uff1a\u5207\u6362\u663e\u793a\u547d\u4ee4\u540d\u79f0\u548c\u5b8c\u6574\u547d\u4ee4\u884c\uff1b\nM\uff1a\u6839\u636e\u9a7b\u7559\u5185\u5b58\u5927\u5c0f\u8fdb\u884c\u6392\u5e8f\uff1b\nP\uff1a\u6839\u636eCPU\u4f7f\u7528\u767e\u5206\u6bd4\u5927\u5c0f\u8fdb\u884c\u6392\u5e8f\uff1b\nT\uff1a\u6839\u636e\u65f6\u95f4\/\u7d2f\u8ba1\u65f6\u95f4\u8fdb\u884c\u6392\u5e8f\uff1b\nw\uff1a\u5c06\u5f53\u524d\u8bbe\u7f6e\u5199\u5165~\/.toprc\u6587\u4ef6\u4e2d\u3002\n<\/code><\/pre>\n<\/p>\nps<\/p>\n
ps\u547d\u4ee4\u7528\u4e8e\u62a5\u544a\u5f53\u524d\u7cfb\u7edf\u7684\u8fdb\u7a0b\u72b6\u6001\u3002\u53ef\u4ee5\u642d\u914dkill\u6307\u4ee4\u968f\u65f6\u4e2d\u65ad\u3001\u5220\u9664\u6bcb\u987b\u8981\u7684\u7a0b\u5e8f\u3002ps\u547d\u4ee4\u662f\u6700\u57fa\u672c\u540c\u65f6\u4e5f\u662f\u5341\u5206\u5f3a\u608d\u7684\u8fdb\u7a0b\u67e5\u770b\u547d\u4ee4\uff0c\u4f7f\u7528\u8be5\u547d\u4ee4\u53ef\u4ee5\u786e\u5b9a\u6709\u4ec0\u4e48\u8fdb\u7a0b\u6b63\u5728\u8fd0\u884c\u548c\u8fd0\u884c\u7684\u72b6\u6001\u3001\u8fdb\u7a0b\u662f\u5426\u7ed3\u675f\u3001\u8fdb\u7a0b\u6709\u6ca1\u6709\u50f5\u6b7b\u3001\u54ea\u4e9b\u8fdb\u7a0b\u5360\u7528\u4e86\u8fc7\u591a\u7684\u8d44\u6e90\u7b49\u7b49\uff0c\u5176\u5b9e\u5927\u90e8\u4efd\u4fe1\u606f\u90fd\u662f\u53ef\u4ee5\u901a\u8fc7\u6267\u884c\u8be5\u547d\u4ee4\u5f97\u5230\u7684\u3002<\/p>\n
\u663e\u793a\u8fdb\u7a0b\u72b6\u6001<\/p>\n
\n
ps -aux\n<\/code><\/pre>\n<\/p>\ntail<\/p>\n
tail\u547d\u4ee4\u7528\u4e8e\u8f93\u5165\u6587\u4ef6\u4e2d\u7684\u5c3e\u90e8\u5185\u5bb9\u3002tail\u547d\u4ee4\u9ed8\u8ba4\u5728\u5c4f\u5e55\u4e0a\u663e\u793a\u6307\u5b9a\u6587\u4ef6\u7684\u672b\u5c3e10\u884c\u3002<\/p>\n
\u987b\u8981\u6ce8\u610f\u7684\u662f\uff1a\u5047\u5982\u8868\u793a\u5b57\u8282\u6216\u884c\u6570\u7684N\u503c\u4e4b\u524d\u6709\u4e00\u4e2a\u201d+\u201d\u53f7\uff0c\u5219\u4ece\u6587\u4ef6\u5f00\u5934\u7684\u7b2cN\u9879\u5f00\u59cb\u663e\u793alinux \u6587\u4ef6\u65f6\u95f4\u6233<\/strong>\uff0c\u800c\u4e0d\u662f\u663e\u793a\u6587\u4ef6\u7684\u6700\u540eN\u9879\u3002<\/p>\n\u663e\u793a\u6587\u4ef6file\u7684\u6700\u540e10\u884c<\/p>\n
\n
tail file\n<\/code><\/pre>\n<\/p>\n\u663e\u793a\u6587\u4ef6file\u7684\u5185\u5bb9\uff0c\u4ece\u7b2c20\u884c\u81f3\u6587\u4ef6\u672b\u5c3e<\/p>\n
\n
tail +20 file \n<\/code><\/pre>\n<\/p>\necho<\/p>\n
echo\u547d\u4ee4\u7528\u4e8e\u5728shell\u4e2d\u590d\u5370shell\u53d8\u91cf\u7684\u503c\uff0c\u6216\u5219\u76f4\u63a5\u8f93\u51fa\u6307\u5b9a\u7684\u5b57\u7b26\u4e32\u3002<\/p>\n
\u9009\u9879<\/p>\n
\n
-e\uff1a\u6fc0\u6d3b\u8f6c\u4e49\u5b57\u7b26\u3002\n<\/code><\/pre>\n<\/p>\n\u4f7f\u7528-e\u9009\u9879\u65f6\uff0c\u82e5\u5b57\u7b26\u4e32\u4e2d\u51fa\u73b0\u4ee5\u4e0b\u5b57\u7b26\uff0c\u5219\u975e\u5e38\u52a0\u4ee5\u5904\u7406\uff0c\u800c\u4e0d\u4f1a\u5c06\u5b83\u5f53\u4f5c\u901a\u5e38\u6587\u5b57\u8f93\u51fa\uff1a<\/p>\n
\n
\na \u53d1\u51fa\u8b66\u544a\u58f0\uff1b\nb \u5220\u9664\u524d\u4e00\u4e2a\u5b57\u7b26\uff1b\nc \u6700\u540e\u4e0d\u52a0\u4e0a\u6362\u884c\u7b26\u53f7\uff1b\nf \u6362\u884c\u4f46\u5149\u6807\u4ecd\u65e7\u505c\u7559\u5728\u539f\u6765\u7684\u4f4d\u7f6e\uff1b\nn \u6362\u884c\u4e14\u5149\u6807\u79fb\u81f3\u884c\u9996\uff1b\nr \u5149\u6807\u79fb\u81f3\u884c\u9996\uff0c\u4f46\u4e0d\u6362\u884c\uff1b\nt \u63d2\u5165tab\uff1b\nv \u4e0ef\u76f8\u540c\uff1b\n\\ \u63d2\u5165\u5b57\u7b26\uff1b\nnnn \u63d2\u5165nnn\uff08\u516b\u8fdb\u5236\uff09\u6240\u4ee3\u8868\u7684ASCII\u5b57\u7b26\uff1b\n<\/code><\/pre>\n<\/p>\n\u7528echo\u547d\u4ee4\u590d\u5370\u5e26\u6709\u8272\u8c03\u7684\u6587\u5b57\uff1a<\/p>\n
\n
echo -e \"e[1;31mI am hikarie[0m\"\n<\/code><\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u5982\u679c\u4e0d\u6307\u5b9a\u8def\u5f84\u540d\uff0c\u4f1a\u5728\u5f53\u524d\u76ee\u5f55\u4e0b\u8fdb\u884c\u67e5\u627e\u3002\u6839\u636e\u6587\u4ef6\u65f6\u95f4\u6233\u8fdb\u884c\u641c\u7d22\u641c\u7d22\u6700\u8fd1\u4e03\u5929\u5185\u88ab\u8bbf\u95ee\u8fc7\u7684\u6240\u6709\u6587\u4ef6\u641c\u7d22\u6070\u597d\u5728\u4e03\u5929\u524d\u88ab\u8bbf\u95ee\u8fc7\u7684\u6240\u6709\u6587\u4ef6\u641c\u7d22\u8d85\u8fc7\u4e03\u5929\u5185\u88ab\u8bbf\u95ee\u8fc7\u7684\u6240\u6709\u6587\u4ef6\u641c\u7d22\u8bbf\u95ee\u65f6\u95f4\u8d85\u8fc710\u5206\u949f\u7684\u6240\u6709\u6587\u4ef6\u4f46\u662f\u5176\u67e5\u5230\u7684\u6587\u4ef6\u53ef\u80fd\u662f\u4e0d\u5b58\u5728\u7684\uff0c\u6216\u8005\u5b58\u5728\u4f46\u662f\u627e\u4e0d\u5230\uff0c\u56e0\u4e3aLinux\u7684\u6587\u4ef6\u6570\u636e\u5e93\u4e0d\u662f\u5b9e\u65f6\u66f4\u65b0\u7684\u3002\u5728top\u547d\u4ee4\u6267\u884c\u8fc7\u7a0b\u4e2d\u53ef\u4ee5\u4f7f\u7528\u7684\u4e00\u4e9b\u4ea4\u4e92\u547d\u4ee4\u3002<\/p>\n","protected":false},"author":1,"featured_media":265776,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-265775","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/265775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=265775"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/265775\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/265776"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=265775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=265775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=265775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}