{"id":272180,"date":"2023-05-15T20:11:29","date_gmt":"2023-05-15T12:11:29","guid":{"rendered":"https:\/\/lrxjmw.cn\/lmljgjwjjbcz.html"},"modified":"2023-05-15T20:11:29","modified_gmt":"2023-05-15T12:11:29","slug":"lmljgjwjjbcz","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/lmljgjwjjbcz.html","title":{"rendered":"Linux\u76ee\u5f55\u7ed3\u6784\u53ca\u6587\u4ef6\u57fa\u672c\u64cd\u4f5c\u5b9e\u9a8c\u4ecb\u7ecd-\u82cf\u5dde\u5b89\u5609"},"content":{"rendered":"

Linux<\/a>\u76ee\u5f55\u7ed3\u6784\u53ca\u6587\u4ef6\u57fa\u672c\u64cd\u4f5c\u5b9e\u9a8c\u4ecb\u7ecd<\/p>\n

1\u3001Linux\u7684\u6587\u4ef6\u7ec4\u7ec7\u76ee\u5f55\u7ed3\u6784\u30022\u3001\u76f8\u5bf9\u8def\u5f84\u548c\u7edd\u5bf9\u8def\u5f84\u30023\u3001\u5bf9\u6587\u4ef6\u7684\u8054\u901a\u3001\u590d\u5236\u3001\u91cd\u547d\u540d\u3001\u7f16\u8f91\u7b49\u64cd\u4f5c\u3002<\/p>\n

\u4e00\u3001Linux\u76ee\u5f55\u7ed3\u6784<\/p>\n

\u5728\u8bb2Linux\u76ee\u5f55\u7ed3\u6784\u4e4b\u524d\uff0c\u4f60\u9996\u5148\u8981\u6e05\u695a\u4e00\u70b9\u4e1c\u897f\uff0c\u90a3\u5c31\u662fLinux\u7684\u76ee\u5f55\u4e0eWindows\u7684\u76ee\u5f55\u7684\u533a\u522b\uff0c\u663e\u7136\u5bf9\u4e8e\u901a\u5e38\u64cd\u4f5c\u4e0a\u7684\u4f53\u4f1a\u6765\u8bf4\u6ca1\u6709\u591a\u5927\u4e0d\u540c\uff0c\u4f46\u4ece\u5b83\u4eec\u7684\u5b9e\u73b0\u673a\u5236\u6765\u8bf4\u662f\u5b8c\u5168\u4e0d\u540c\u7684\u3002<\/p>\n

\u4e00\u79cd\u4e0d\u540c\u662f\u5f70\u663e\u5728\u76ee\u5f55\u4e0e\u50a8\u5b58\u4ecb\u8d28\uff08c\u76d8\uff0c\u663e\u5b58\uff0cDVD\u7b49\uff09\u7684\u5173\u7cfb\u4e0a\uff0c\u5f80\u5e74\u7684Windows\u4ecd\u7136\u662f\u4ee5\u50a8\u5b58\u4ecb\u8d28\u4e3a\u4e3b\u7684\uff0c\u4e3b\u8981\u4ee5c\u76d8\uff08C\u76d8\uff0cD\u76d8...\uff09\u53ca\u5206\u533a\u7684\u6765\u5b9e\u73b0\u6587\u4ef6\u7ba1\u7406\uff0c\u4e4b\u540e\u4e4b\u4e0b\u624d\u662f\u76ee\u5f55\uff0c\u76ee\u5f55\u5c31\u53d8\u5f97\u4e0d\u662f\u8fd9\u4e48\u91cd\u8981\uff0c\u9664\u7cfb\u7edf<\/a>\u6587\u4ef6\u4e4b\u5916\u7684\u7528\u6237\u6587\u4ef6\u7f6e\u4e8e\u4efb\u4f55\u5730\u65b9\u4efb\u4f55\u76ee\u5f55\u4e5f\u662f\u6ca1\u6709\u591a\u5927\u5173\u7cfb\u3002\u6240\u4ee5\u4e00\u822cWindows\u5728\u4f7f\u7528\u4e00\u6bb5\u65f6\u95f4\u540e\uff0cc\u76d8\u91cc\u9762\u7684\u6587\u4ef6\u76ee\u5f55\u4f1a\u53d8\u5f97\u96f6\u4e71\u65e0\u7ae0\uff08\u5c11\u6570\u64c5\u4e8e\u6574\u7406\u7684\u7528\u6237\u9664\u5916\u5427\uff09\u3002\u4f46\u662fUNIX\/Linux\u6b63\u597d\u76f8\u53cd\uff0cUNIX\u662f\u4ee5\u76ee\u5f55\u4e3a\u4e3b\u7684\uff0cLinux\u4e5f\u627f\u7ee7\u4e86\u8fd9\u4e00\u4f18\u826f\u7279\u70b9\u3002Linux\u662f\u4ee5\u6811\u72b6\u76ee\u5f55\u7ed3\u6784\u7684\u65b9\u5f0f\u6765\u5efa\u7acb\u6574\u4e2a\u7cfb\u7edf\u7684\u7ea2\u65d7linux\u64cd\u4f5c\u7cfb\u7edf\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u7528\u6237\u53ef\u64cd\u4f5c\u7cfb\u7edf\u7684\u9aa8\u67b6\u3002\u5176\u5b9e\u672c\u8d28\u4e0a\u65e0\u8bba\u662f\u76ee\u5f55\u7ed3\u6784\u8fd8\u662f\u64cd\u4f5c\u7cfb\u7edf\u5185\u6838\u90fd\u662f\u50a8\u5b58\u5728c\u76d8\u4e0a\u7684\uff0c\u4f46\u4ece\u903b\u8f91\u4e0a\u6765\u8bf4Linux\u7684c\u76d8\u662f\u201c\u6302\u5728\u201d\uff08\u6302\u8f7d\u5728\uff09\u76ee\u5f55\u4e0a\u7684\uff0c\u6bcf\u4e00\u4e2a\u76ee\u5f55\u9664\u4e86\u80fd\u4f7f\u7528\u672c\u5730c\u76d8\u5206\u533a\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528\u7f51\u8def\u4e0a\u7684\u6587\u4ef6\u7cfb\u7edf\u3002\u4e3e\u4f8b\u6765\u8bf4\uff0c\u53ef\u4ee5\u501f\u52a9\u7f51\u8def\u6587\u4ef6\u7cfb\u7edf\uff08NetworkFileSystem\uff0cNFS\uff09\u670d\u52a1\u5668\u8f7d\u5165\u67d0\u7279\u5b9a\u76ee\u5f55\u7b49\u3002<\/p>\n

1.FHS\u6807\u51c6<\/p>\n

Linux\u7684\u76ee\u5f55\u7ed3\u6784\u8bf4\u590d\u6742\u5f88\u590d\u6742\uff0c\u8bf4\u7b80\u5355\u4e5f\u5f88\u7b80\u5355\u3002\u590d\u6742\u5728\u4e8e\uff0c\u7531\u4e8e\u7cfb\u7edf\u7684\u6b63\u5e38\u8fd0\u884c\u662f\u4ee5\u76ee\u5f55\u7ed3\u6784\u4e3a\u57fa\u7840\u7684\uff0c\u5bf9\u4e8e\u521d\u5b66\u8005\u6765\u8bf4\u4e0a\u9762\u5927\u90e8\u4efd\u76ee\u5f55\u90fd\u4e0d\u6653\u5f97\u5176\u4f5c\u7528\uff0c\u91cd\u8981\u4e0e\u5426\uff0c\u975e\u5e38\u5bf9\u4e8e\u4ec0\u4e48\u4ee5\u524d\u7684\u8f7b\u5ea6Windows\u7528\u6237\uff0c\u5979\u4eec\u4f1a\u82e6\u607c\u5f88\u957f\u65f6\u95f4\uff0c\u5173\u4e8e\u6211\u5b89\u88c5\u7684\u8f6f\u4ef6\u5728\u90a3\u91cc\u8fd9\u7c7b\u95ee\u9898\u3002\u8bf4\u5b83\u7b80\u5355\u662f\u7531\u4e8e\uff0c\u5b83\u5176\u4e2d\u5927\u90e8\u4efd\u76ee\u5f55\u7ed3\u6784\u662f\u89c4\u5b9a\u597d\u4e86\uff08FHS\u6807\u51c6\uff09\uff0c\u662f\u6b7b\u7684\uff0c\u5f53\u4f60\u628a\u63e1\u540e\uff0c\u4f60\u5728\u4e0a\u9762\u7684\u4e00\u5207\u64cd\u4f5c\u8fd8\u4f1a\u663e\u5f97\u4e95\u7136\u6709\u5e8f\u3002<\/p>\n

FHS\uff08\u82f1\u8bed\uff1aFilesystemHierarchyStandard\u82f1\u6587\uff1a\u6587\u4ef6\u7cfb\u7edf\u5c42\u6b21\u7ed3\u6784\u6807\u51c6\uff09\uff0c\u591a\u6570Linux\u7248\u672c\u91c7\u7528\u8fd9\u4e9b\u6587\u4ef6\u7ec4\u7ec7\u65b9\u5f0f\uff0cFHS\u5b9a\u4e49\u4e86\u7cfb\u7edf\u4e2d\u6bcf\u4f4d\u533a\u57df\u7684\u7528\u9014\u3001\u6240\u987b\u8981\u7684\u6700\u5c0f\u6784\u6210\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u540c\u65f6\u8fd8\u7ed9\u51fa\u4e86\u4f8b\u5916\u5904\u7406\u4e0e\u77db\u76fe\u5904\u7406\u3002<\/p>\n

FHS\u5b9a\u4e49\u4e86\u4e24\u5c42\u89c4\u8303\uff0c\u7b2c\u4e00\u5c42\u662f\uff0c\/\u4e0b\u8fb9\u7684\u5404\u4e2a\u76ee\u5f55\u5e94\u5f53\u8981\u653e\u54ea\u4e9b\u6587\u4ef6\u6570\u636e\uff0c\u6bd4\u5982\/etc\u5e94\u5f53\u8981\u653e\u7f6e\u8bbe\u7f6e\u6587\u4ef6\uff0c\/bin\u4e0e\/sbin\u5219\u5e94\u5f53\u8981\u653e\u7f6e\u53ef\u6267\u884c\u6587\u4ef6\u7b49\u7b49\u3002<\/p>\n

\u7b2c\u4e8c\u5c42\u5219\u662f\u9488\u5bf9\/usr\u53ca\/var\u8fd9\u4e24\u4e2a\u76ee\u5f55\u7684\u5b50\u76ee\u5f55\u6765\u5b9a\u4e49\u3002\u8bf8\u5982\/var\/log\u653e\u7f6e\u7cfb\u7edf\u767b\u9646\u6587\u4ef6\u3001\/usr\/share\u653e\u7f6e\u5171\u4eab\u6570\u636e\u7b49\u7b49\u3002<\/p>\n

FHS_2.3\u6807\u51c6\u6587\u6863<\/p>\n

\u5047\u5982\u4f60\u8ba4\u4e3a\u770b\u8fd9\u4e2a\u4e0d\u660e\u767d\uff0c\u8fd9\u4e48\u4f60\u53ef\u4ee5\u8bd5\u8bd5\u6700\u771f\u5b9e\u6700\u76f4\u89c2\u7684\u65b9\u6cd5\uff0c\u6267\u884c\u5982\u4e0b\u547d\u4ee4<\/a>\uff1a<\/p>\n

\n

$ tree \/\n<\/code><\/pre>\n<\/p>\n

\u5047\u5982\u63d0\u793a\"commandnotfound\"\uff0c\u5c31\u5148\u5b89\u88c5\uff1a<\/p>\n

\n

# \u56e0\u4e3a\u6211\u4eec\u7684\u73af\u5883\u7684\u539f\u56e0\uff0c\u6bcf\u6b21\u65b0\u542f\u52a8\u5b9e\u9a8c\u4f1a\u6e05\u9664\u7cfb\u7edf\u6062\u590d\u521d\u59cb\u72b6\u6001\uff0c\u6240\u4ee5\u9700\u8981\u624b\u52a8\u66f4\u65b0\u8f6f\u4ef6\u5305\u7d22\u5f15\uff0c\u4ee5\u4fbf\u6211\u4eec\u5b89\u88c5\u65f6\u80fd\u627e\u5230\u76f8\u5e94\u8f6f\u4ef6\u5305\u7684\u6e90<\/span>\nsudo apt-get<\/span> update\nsudo apt-get<\/span> install tree\n<\/code><\/pre>\n<\/p>\n

\u5173\u4e8e\u91cc\u9762\u63d0\u53ca\u7684FHS\uff0c\u8fd9\u513f\u8fd8\u6709\u4e2a\u5f88\u91cd\u8981\u7684\u5185\u5bb9\u4f60\u4e00\u5b9a\u8981\u660e\u767d\uff0cFHS\u662f\u4f9d\u636e\u5f80\u5e74\u65e0\u6570Linux\u7528\u6237\u548c\u5f00\u53d1\u8005\u7684\u7ecf\u9a8c\u603b\u7ed3\u4e0b\u6765\u7684linux\u76ee\u5f55\u7ed3\u6784\u662f<\/strong>\uff0c\u4f46\u662f\u4f1a\u7ef4\u6301\u66f4\u65b0\uff0cFHS\u6839\u636e\u6587\u4ef6\u7cfb\u7edf\u4f7f\u7528\u7684\u9891\u7e41\u4e0e\u5426\u4ee5\u53ca\u662f\u5426\u5bb9\u8bb8\u7528\u6237\u968f\u4fbf\u6539\u52a8\uff08\u6ce8\u610f\uff0c\u4e0d\u662f\u4e0d\u80fd\uff0c\u5b66\u4e60\u8fc7\u7a0b\u4e2d\uff0c\u4e0d\u8981\u6015\u90a3\u4e9b\uff09\uff0c\u5c06\u76ee\u5f55\u5b9a\u4e49\u4e3a\u56db\u79cd\u4ea4\u4e92\u4f5c\u7528\u7684\u5f62\u6001\uff0c\u5982\u4e0b\u8868\u6240\u793a\uff1a<\/p>\n

2.\u76ee\u5f55\u8def\u5f84\u8def\u5f84<\/p>\n

\u6709\u4eba\u53ef\u80fd\u4e0d\u660e\u767d\u8fd9\u8def\u5f84\u662f\u6307\u54ea\u4e9b\uff0c\u6709\u54ea\u4e9b\u7528\u3002\u987e\u540d\u601d\u4e49\uff0c\u8def\u5f84\u5c31\u662f\u4f60\u8981\u53bb\u54ea\u91cc\u7684\u8def\u7ebf\u561b\u3002\u5047\u5982\u4f60\u60f3\u6b65\u5165\u67d0\u4e2a\u5177\u4f53\u7684\u76ee\u5f55\u6216\u5219\u60f3\u83b7\u5f97\u67d0\u4e2a\u76ee\u5f55\u7684\u6587\u4ef6\uff08\u76ee\u5f55\u672c\u8eab\u4e5f\u662f\u6587\u4ef6\uff09\u90a3\u5c31\u5f97\u7528\u8def\u5f84\u6765\u627e\u5230\u4e86\u3002<\/p>\n

\u4f7f\u7528cd\u547d\u4ee4\u53ef\u4ee5\u5207\u6362\u76ee\u5f55\uff0c\u5728Linux\u4e0a\u9762\u4f7f\u7528.\u8868\u793a\u5f53\u524d\u76ee\u5f55\uff0c..\u8868\u793a\u4e0a\u4e00\u7ea7\u76ee\u5f55\uff08**\u6ce8\u610f\uff0c\u8fd8\u8bb0\u5f97\u6211\u4eec\u4e0a\u4e00\u8282\u4ecb\u7ecd\u8fc7\u7684\uff0c\u4ee5.\u5f00\u5934\u7684\u6587\u4ef6\u90fd\u662f\u9690\u85cf\u6587\u4ef6\uff0c\u6240\u4ee5\u8fd9\u4e24\u4e2a\u76ee\u5f55\u5fc5\u7136\u4e5f\u662f\u9690\u85cf\u7684\uff0c\u4f60\u53ef\u4ee5\u4f7f\u7528ls-a\u547d\u4ee4\u67e5\u770b\u9690\u85cf\u6587\u4ef6\uff09,-\u8868\u793a\u4e0a\u4e00\u6b21\u6240\u5728\u76ee\u5f55\uff0c\uff5e\u901a\u5e38\u8868\u793a\u5f53\u524d\u7528\u6237\u7684\"home\"\u76ee\u5f55\u3002\u4f7f\u7528pwd\u547d\u4ee4\u53ef\u4ee5\u83b7\u53d6\u5f53\u524d\u6240\u5728\u8def\u5f84\uff08\u7edd\u5bf9\u8def\u5f84\uff09\u3002<\/p>\n

\u6b65\u5165\u4e0a\u4e00\u7ea7\u76ee\u5f55\uff1a<\/p>\n

\n

$ cd<\/span> ..\n<\/code><\/pre>\n<\/p>\n

\u6b65\u5165\u4f60\u7684\u201chome\u201d\u76ee\u5f55\uff1a<\/p>\n

\n

$ cd<\/span> ~ \n# \u6216\u8005 cd \/home\/<\/span>\n<\/code><\/pre>\n<\/p>\n

\u4f7f\u7528pwd\u83b7\u53d6\u5f53\u524d\u8def\u5f84\uff1a<\/p>\n

\n

$ pwd<\/span>\n<\/code><\/pre>\n<\/p>\n

\u7edd\u5bf9\u8def\u5f84<\/p>\n

\u5173\u4e8e\u7edd\u5bf9\u8def\u5f84\uff0c\u7b80\u5355\u5730\u8bf4\u5c31\u662f\u4ee5\u6839\"\/\"\u76ee\u5f55\u4e3a\u8d77\u70b9\u7684\u5b8c\u6574\u8def\u5f84\uff0c\u4ee5\u4f60\u6240\u8981\u5230\u7684\u76ee\u5f55\u4e3a\u7ec8\u70b9\uff0c\u8868\u73b0\u65b9\u5f0f\u5982\uff1a\/usr\/local\/bin\uff0c\u8868\u793a\u6839\u76ee\u5f55\u4e0b\u7684usr\u76ee\u5f55\u4e2d\u7684local\u76ee\u5f55\u4e2d\u7684bin\u76ee\u5f55\u3002<\/p>\n

\u76f8\u5bf9\u8def\u5f84<\/p>\n

\u76f8\u5bf9\u8def\u5f84\uff0c\u4e5f\u5c31\u662f\u76f8\u5bf9\u4e8e\u4f60\u5f53\u524d\u7684\u76ee\u5f55\u7684\u8def\u5f84\uff0c\u76f8\u5bf9\u8def\u5f84\u662f\u4ee5\u5f53\u524d\u76ee\u5f55.\u4e3a\u8d77\u70b9\uff0c\u4ee5\u4f60\u6240\u8981\u5230\u7684\u76ee\u5f55\u4e3a\u7ec8\u70b9\uff0c\u8868\u73b0\u65b9\u5f0f\u5982\uff1ausr\/local\/bin\uff08\u8fd9\u513f\u5047\u5b9a\u4f60\u5f53\u524d\u76ee\u5f55\u4e3a\u6839\u76ee\u5f55\uff09\u3002\u4f60\u53ef\u80fd\u6ce8\u610f\u5230\uff0c\u6211\u4eec\u8868\u793a\u76f8\u5bf9\u8def\u5f84\u5b9e\u9645\u5e76\u6ca1\u6709\u52a0\u4e0a\u8868\u793a\u5f53\u524d\u76ee\u5f55\u7684\u90a3\u79cd.\uff0c\u800c\u662f\u76f4\u63a5\u4ee5\u76ee\u5f55\u540d\u5f00\u5934\uff0c\u7531\u4e8e\u8fd9\u4e2ausr\u76ee\u5f55\u4e3a\/\u76ee\u5f55\u4e0b\u7684\u5b50\u76ee\u5f55\uff0c\u662f\u53ef\u4ee5\u7701\u7565\u8fd9\u4e2a.\u7684\uff08\u4e4b\u540e\u4f1a\u63d0\u5230\u4e00\u4e2a\u7c7b\u4f3c\u4e0d\u80fd\u7701\u7565\u7684\u60c5\u51b5\uff09\uff1b\u5047\u5982\u662f\u5f53\u524d\u76ee\u5f55\u7684\u4e0a\u4e00\u7ea7\u76ee\u5f55\uff0c\u5219\u987b\u8981\u4f7f\u7528..\uff0c\u4f8b\u5982\u4f60\u5f53\u524d\u76ee\u5f55\u4e3a\u201chome\u201d\u76ee\u5f55\uff0c\u6839\u76ee\u5f55\u5c31\u5e94\u5f53\u8868\u793a\u4e3a..\/..\/,\u8868\u793a\u4e0a\u4e00\u7ea7\u76ee\u5f55\uff08\"home\"\u76ee\u5f55\uff09\u7684\u4e0a\u4e00\u7ea7\u76ee\u5f55\uff08\"\/\"\u76ee\u5f55\uff09\u3002<\/p>\n

\u4e0b\u8fb9\u6211\u4eec\u4ee5\u4f60\u7684\"home\"\u76ee\u5f55\u4e3a\u8d77\u70b9\uff0c\u5206\u522b\u4ee5\u7edd\u5bf9\u8def\u5f84\u548c\u76f8\u5bf9\u8def\u5f84\u7684\u5f62\u5f0f\u6b65\u5165\/usr\/local\/bin\u76ee\u5f55\uff1a<\/p>\n

\n

# \u7edd\u5bf9\u8def\u5f84<\/span>\n$ cd<\/span> \/usr\/local<\/span>\/bin\n# \u76f8\u5bf9\u8def\u5f84<\/span>\n$ cd<\/span> ..\/..\/usr\/local<\/span>\/bin\n<\/code><\/pre>\n<\/p>\n

\u6b65\u5165\u4e00\u4e2a\u76ee\u5f55\uff0c\u53ef\u4ee5\u4f7f\u7528\u7edd\u5bf9\u8def\u5f84\u4e5f\u53ef\u4ee5\u4f7f\u7528\u76f8\u5bf9\u8def\u5f84\uff0c\u90a3\u6211\u4eec\u5e94\u5f53\u5728\u54ea\u4e9b\u65f6\u4faf\u9009\u62e9\u6b63\u786e\u7684\u65b9\u6cd5\u6b65\u5165\u67d0\u4e2a\u76ee\u5f55\u5462\u3002\u5c31\u662f\u51ed\u76f4\u89c9\u561b\uff0c\u4f60\u8ba4\u4e3a\u600e\u4e48\u4fbf\u6377\u5c31\u4f7f\u7528\u54ea\u4e00\u4e2a\uff0c\u800c\u4e0d\u7528\u7279\u610f\u53ea\u4f7f\u7528\u67d0\u4e00\u79cd\u3002\u4f8b\u5982\u5047\u5b9a\u6211\u5f53\u524d\u5728\/usr\/local\/bin\u76ee\u5f55\uff0c\u6211\u60f3\u6b65\u5165\u4e0a\u4e00\u7ea7\u7684local\u76ee\u5f55\u4f60\u8bf4\u662f\u4f7f\u7528cd..\u4fbf\u6377\u8fd8\u662fcd\/usr\/local\u4fbf\u6377\u3002\u800c\u5018\u82e5\u8981\u6b65\u5165\u7684\u662fusr\u76ee\u5f55\uff0c\u8fd9\u4e48cd\/usr\uff0c\u5c31\u6bd4cd..\/..\u4fbf\u6377\u4e00\u70b9\u4e86\u3002<\/p>\n

\u63d0\u793a\uff1a\u5728\u8fdb\u884c\u76ee\u5f55\u5207\u6362\u7684\u8fc7\u7a0b\u4e2d\u8bf7\u591a\u4f7f\u7528Tab\u952e\u624b\u52a8\u8865\u5168\uff0c\u53ef\u9632\u6b62\u8f93\u5165\u9519\u8bef\uff0c\u8fde\u7eed\u6309\u4e24\u6b21Tab\u53ef\u4ee5\u663e\u793a\u5168\u90e8\u5019\u9009\u7ed3\u679c<\/p>\n

\u4e8c\u3001Linux\u6587\u4ef6\u7684\u57fa\u672c\u64cd\u4f5c1.\u65b0\u5efa\u65b0\u5efa\u7a7a\u767d\u6587\u4ef6<\/p>\n

\u4f7f\u7528touch\u547d\u4ee4\u521b\u5efa\u7a7a\u767d\u6587\u4ef6\uff0c\u5173\u4e8etouch\u547d\u4ee4\uff0c\u5176\u4e3b\u8981\u662f\u6765\u4fee\u6539\u5df2\u6709\u6587\u4ef6\u7684\u65f6\u95f4\u6233\u7684\uff08\u4f8b\u5982\uff0c\u8fd1\u6765\u8bbf\u95ee\u65f6\u95f4\uff0c\u8fd1\u6765\u66f4\u6539\u65f6\u95f4\uff09\uff0c\u4f46\u5176\u5728\u4e0d\u52a0\u4efb\u4f55\u53c2\u6570\u7684\u60c5\u51b5\u4e0b\uff0c\u53ea\u6307\u5b9a\u4e00\u4e2a\u6587\u4ef6\u540d\uff0c\u5219\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u4e3a\u6307\u5b9a\u6587\u4ef6\u540d\u7684\u7a7a\u767d\u6587\u4ef6\uff08\u4e0d\u4f1a\u8986\u76d6\u5df2\u6709\u540c\u540d\u6587\u4ef6\uff09\uff0c\u5176\u5b9e\u4f60\u4e5f\u53ef\u4ee5\u540c\u65f6\u6307\u5b9a\u8be5\u6587\u4ef6\u7684\u65f6\u95f4\u6233\uff0c\u66f4\u591a\u5173\u4e8etouch\u547d\u4ee4\u7684\u7528\u6cd5\uff0c\u4f1a\u5728\u4e0b\u4e00\u8bb2\u6587\u4ef6\u641c\u7d22\u4e2d\u6d89\u53ca\u3002<\/p>\n

\u521b\u5efa\u540d\u4e3atest\u7684\u7a7a\u767d\u6587\u4ef6\uff0c\u7531\u4e8e\u5728\u5176\u4ed6\u76ee\u5f55\u6ca1\u6709\u6743\u9650\uff0c\u6240\u4ee5\u987b\u8981\u5148cd~\u5207\u6362\u56de\u7528\u6237\u7684\/home\/shiyanlou\u76ee\u5f55\uff1a<\/p>\n

\n

$ cd<\/span> ~\n$ touch test<\/span>\n<\/code><\/pre>\n<\/p>\n

\u65b0\u5efa\u76ee\u5f55<\/p>\n

\u4f7f\u7528mkdir\uff08makedirectories\uff09\u547d\u4ee4\u53ef\u4ee5\u521b\u5efa\u4e00\u4e2a\u7a7a\u76ee\u5f55,\u4e5f\u53ef\u540c\u65f6\u6307\u5b9a\u521b\u5efa\u76ee\u5f55\u7684\u6743\u9650\u5c5e\u6027<\/p>\n

\u521b\u5efa\u540d\u4e3a\"mydir\"\u7684\u7a7a\u76ee\u5f55\uff1a<\/p>\n

\n

$ mkdir<\/span> mydir\n<\/code><\/pre>\n<\/p>\n

\u4f7f\u7528-p\u53c2\u6570\uff0c\u540c\u65f6\u521b\u5efa\u7236\u76ee\u5f55\uff08\u5047\u5982\u4e0d\u5b58\u5728\u8be5\u7236\u76ee\u5f55\uff09\uff0c\u5982\u4e0b\u6211\u4eec\u540c\u65f6\u521b\u5efa\u4e00\u4e2a\u591a\u7ea7\u76ee\u5f55\uff08\u8fd9\u5728\u6709\u65f6\u4faf\u5b89\u88c5\u8f6f\u4ef6\uff0c\u914d\u7f6e\u5b89\u88c5\u8def\u5f84\u65f6\u7279\u522b\u6709\u7528\uff09\uff1a<\/p>\n

\n

$ mkdir<\/span> -p father\/son\/grandson\n<\/code><\/pre>\n<\/p>\n

\u524d\u9762\u7684\u76ee\u5f55\u8def\u5f84\uff0c\u4ee5\u7edd\u5bf9\u8def\u5f84\u7684\u65b9\u6cd5\u8868\u793a\u4e5f\u662f\u53ef\u4ee5\u7684\u3002<\/p>\n

2.\u590d\u5236\u590d\u5236\u6587\u4ef6<\/p>\n

\u4f7f\u7528cp\uff08copy\uff09\u547d\u4ee4\u590d\u5236\u4e00\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\u5230\u6307\u5b9a\u76ee\u5f55\u3002\u5c06\u4e4b\u524d\u521b\u5efa\u7684\"test\"\u6587\u4ef6\u590d\u5236\u5230\"\/home\/shiyanlou\/father\/son\/grandson\"\u76ee\u5f55\u4e2d\uff1a<\/p>\n

\n

$ cp test<\/span> father\/son\/grandson\n<\/code><\/pre>\n<\/p>\n

\u662f\u4e0d\u662f\u5f88\u4fbf\u6377\u554a\uff0c\u5047\u5982\u5728\u56fe\u5f62\u754c\u9762\u5219\u987b\u8981\u5148\u5728\u6e90\u76ee\u5f55\u590d\u5236\u6587\u4ef6\uff0c\u518d\u8fdb\u5230\u76ee\u7684\u76ee\u5f55\u7c98\u8d34\u6587\u4ef6\uff0c\u547d\u4ee4\u884c\u64cd\u4f5c\u6b65\u9aa4\u5c31\u4e00\u6b65\u5230\u4f4d\u4e86\u561b\u3002<\/p>\n

\u590d\u5236\u76ee\u5f55<\/p>\n

\u5047\u5982\u76f4\u63a5\u4f7f\u7528cp\u547d\u4ee4\uff0c\u590d\u5236\u4e00\u4e2a\u76ee\u5f55\u7684\u8bdd\uff0c\u4f1a\u51fa\u73b0\u5982\u4e0b\u9519\u8bef\uff1a<\/p>\n

\u8981\u6210\u529f\u590d\u5236\u76ee\u5f55\u987b\u8981\u52a0\u4e0a-r\u6216\u5219-R\u53c2\u6570\uff0c\u8868\u793a\u9012\u5f52\u590d\u5236\uff0c\u5c31\u662f\u8bf4\u6709\u70b9\u201c\u682a\u8fde\u5341\u65cf\u201d\u7684\u610f\u601d\uff1a<\/p>\n

\n

$ cp -r father family\n<\/code><\/pre>\n<\/p>\n

3.\u5220\u6389\u5220\u6389\u6587\u4ef6<\/p>\n

\u4f7f\u7528rm\uff08removefilesordirectories\uff09\u547d\u4ee4\uff0c\u5220\u6389\u4e00\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\uff1a<\/p>\n

\n

$ rm test<\/span>\n<\/code><\/pre>\n<\/p>\n

\u6709\u65f6\u4faf\u4f60\u4f1a\u9047\u89c1\u60f3\u8981\u5220\u6389\u4e00\u4e9b\u4e3a\u53ea\u8bfb\u6743\u9650\u7684\u6587\u4ef6\uff0c\u76f4\u63a5\u4f7f\u7528rm\u5220\u6389\u4f1a\u663e\u793a\u4e00\u4e2a\u63d0\u793a\uff0c\u5982\u4e0b\uff1a<\/p>\n

\u4f60\u82e5\u679c\u60f3\u5ffd\u89c6\u8fd9\u63d0\u793a\uff0c\u76f4\u63a5\u5220\u6389\u6587\u4ef6\uff0c\u53ef\u4ee5\u4f7f\u7528-f\u53c2\u6570\u5f3a\u5236\u5220\u6389\uff1a<\/p>\n

\n

$ rm -f<\/span> test<\/span>\n<\/code><\/pre>\n<\/p>\n

\u5220\u6389\u76ee\u5f55<\/p>\n

\u8ddf\u590d\u5236\u76ee\u5f55\u4e00\u6837\uff0c\u8981\u5220\u6389\u4e00\u4e2a\u76ee\u5f55\uff0c\u4e5f\u987b\u8981\u52a0\u4e0a-r\u6216-R\u53c2\u6570\uff1a<\/p>\n

\n

$ rm -r family\n<\/code><\/pre>\n<\/p>\n

4.\u8054\u901a\u6587\u4ef6\u4e0e\u6587\u4ef6\u91cd\u547d\u540d\u8054\u901a\u6587\u4ef6<\/p>\n

\u4f7f\u7528mv(moveorrenamefiles)\u547d\u4ee4\uff0c\u8054\u901a\u6587\u4ef6\uff08\u526a\u5207\uff09\u3002\u5c06\u6587\u4ef6\"file1\"\u8054\u901a\u5230\"Documents\"\u76ee\u5f55mv\u6e90\u76ee\u5f55\u6587\u4ef6\u76ee\u7684\u76ee\u5f55\uff1a<\/p>\n

\n

$ mkdir Documents\n$ mv file1 Documents\n<\/code><\/pre>\n<\/p>\n

\u91cd\u547d\u540d\u6587\u4ef6<\/p>\n

\u5c06\u6587\u4ef6\"file1\"\u91cd\u547d\u540d\u4e3a\"myfile\"mv\u65e7\u7684\u6587\u4ef6\u540d\u65b0\u7684\u6587\u4ef6\u540d\uff1a<\/p>\n

\n

$ mv file1 myfile\n<\/code><\/pre>\n<\/p>\n

\u6279\u91cf\u91cd\u547d\u540d<\/p>\n

\u8981\u5b9e\u73b0\u6279\u91cf\u91cd\u547d\u540d\uff0cmv\u547d\u4ee4\u5c31\u6709\u70b9\u529b\u4e0d\u4ece\u5fc3\u4e86\uff0c\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u4e00\u4e2a\u770b\u4e0a\u53bb\u66f4\u4e13\u4e1a\u7684\u547d\u4ee4rename\u6765\u5b9e\u73b0\u3002\u4e0d\u8fc7\u5b83\u662f\u8981\u7528perl\u6b63\u5219\u8868\u8fbe\u5f0f\u6765\u4f5c\u4e3a\u53c2\u6570\uff0c\u5173\u4e8e\u6b63\u5219\u8868\u8fbe\u5f0f\u6211\u4eec\u8981\u5728\u524d\u9762\u624d\u80fd\u4ecb\u7ecd\u5230\uff0c\u8fd9\u513f\u53ea\u505a\u6f14\u793a\uff0c\u4f60\u53ea\u8981\u8bb0\u5f97\u8fd9\u4e2arename\u547d\u4ee4\u53ef\u4ee5\u6279\u91cf\u91cd\u547d\u540d\u5c31\u597d\u4e86\uff0c\u4e4b\u540e\u518d\u91cd\u65b0\u5b66\u4e60\u4e5f\u4e0d\u4f1a\u6709\u4efb\u4f55\u95ee\u9898\uff0c\u867d\u7136\u4f60\u5df2\u7136\u628a\u63e1\u4e86\u4e00\u4e2a\u66f4\u5e38\u7528\u7684mv\u547d\u4ee4\u3002<\/p>\n

\n

# \u4f7f\u7528\u901a\u914d\u7b26\u6279\u91cf\u521b\u5efa 5 \u4e2a\u6587\u4ef6<\/span>\n$ touch file{1<\/span>..5<\/span>}.txt\n# \u6279\u91cf\u5c06\u8fd9 5 \u4e2a\u540e\u7f00\u4e3a .txt \u7684\u6587\u672c\u6587\u4ef6\u91cd\u547d\u540d\u4e3a\u4ee5 .c \u4e3a\u540e\u7f00\u7684\u6587\u4ef6<\/span>\n$ rename 's\/.txt\/.c\/'<\/span> *.txt\n# \u6279\u91cf\u5c06\u8fd9 5 \u4e2a\u6587\u4ef6\uff0c\u6587\u4ef6\u540d\u6539\u4e3a\u5927\u5199<\/span>\n$ rename 'y\/a-z\/A-Z\/'<\/span> *.c\n<\/code><\/pre>\n<\/p>\n

\u7b80\u5355\u89e3\u91ca\u4e0b\u91cc\u9762\u7684\u547d\u4ee4\uff0crename\u662f\u5148\u4f7f\u7528\u7b2c\u4e8c\u4e2a\u53c2\u6570\u7684\u952e\u503c\u5339\u914d\u6240\u6709\u540e\u7f00\u4e3a.txt\u7684\u6587\u4ef6\uff0c\u4e4b\u540e\u4f7f\u7528\u7b2c\u4e00\u4e2a\u53c2\u6570\u63d0\u4f9b\u7684\u6b63\u5219\u8868\u8fbe\u5f0f\u5c06\u5339\u914d\u7684\u90a3\u4e9b\u6587\u4ef6\u7684.txt\u540e\u7f00\u66ff\u6362\u4e3a.c\uff0c\u8fd9\u4e00\u70b9\u5728\u6211\u4eec\u524d\u9762\u5b66\u4e60\u4e86sed\u547d\u4ee4\u540e,\u76f8\u4fe1\u4f60\u4f1a\u66f4\u597d\u7684\u7406\u89e3\u3002<\/p>\n

5.\u67e5\u770b\u6587\u4ef6\u4f7f\u7528cat,tac\u548cnl\u547d\u4ee4\u67e5\u770b\u6587\u4ef6<\/p>\n

\u8fd9\u4e24\u4e2a\u547d\u4ee4\u90fd\u662f\u62ff\u6765\u590d\u5370\u6587\u4ef6\u5185\u5bb9\u5230\u6807\u51c6\u8f93\u51fa\uff08\u7ec8\u7aef\uff09,\u5176\u4e2dcat\u4e3a\u4e71\u5e8f\u663e\u793a\uff0ctac\u9006\u5e8f\u663e\u793a\u3002<\/p>\n

\u6807\u51c6\u8f93\u5165\u8f93\u51fa\uff1a\u5f53\u6211\u4eec\u6267\u884c\u4e00\u4e2ashell\u547d\u4ee4\u884c\u65f6\u4e00\u822c\u4f1a\u624b\u52a8\u6253\u5f00\u4e09\u4e2a\u6807\u51c6\u6587\u4ef6\uff0c\u5373\u6807\u51c6\u8f93\u5165\u6587\u4ef6\uff08stdin\uff09\uff0c\u9ed8\u8ba4\u5bf9\u5e94\u7ec8\u7aef\u7684\u6309\u952e\uff1b\u6807\u51c6\u8f93\u51fa\u6587\u4ef6\uff08stdout\uff09\u548c\u6807\u51c6\u9519\u8bef\u8f93\u51fa\u6587\u4ef6\uff08stderr\uff09\uff0c\u8fd9\u4e24\u4e2a\u6587\u4ef6\u90fd\u5bf9\u5e94\u88ab\u91cd\u5b9a\u5411\u5230\u7ec8\u7aef\u7684\u5c4f\u5e55\uff0c\u4fbf\u4e8e\u6211\u4eec\u80fd\u76f4\u63a5\u770b\u89c1\u8f93\u51fa\u5185\u5bb9\u3002\u8fdb\u7a0b\u5c06\u4ece\u6807\u51c6\u8f93\u5165\u6587\u4ef6\u4e2d\u5f97\u5230\u8f93\u5165\u6570\u636e\uff0c\u5c06\u6b63\u5e38\u8f93\u51fa\u6570\u636e\u8f93\u51fa\u5230\u6807\u51c6\u8f93\u51fa\u6587\u4ef6\uff0c\u800c\u5c06\u9519\u8bef\u4fe1\u606f\u9001\u5230\u6807\u51c6\u9519\u8bef\u6587\u4ef6\u4e2d\u3002<\/p>\n

\u4f8b\u5982\u6211\u4eec\u8981\u67e5\u770b\u4e4b\u524d\u4ece\"\/etc\"\u76ee\u5f55\u4e0b\u62f7\u8d1d\u6765\u7684passwd\u6587\u4ef6\uff1a<\/p>\n

\n

$ cat passwd\n<\/code><\/pre>\n<\/p>\n

\u53ef\u4ee5\u52a0\u4e0a-n\u53c2\u6570\u663e\u793a\u884c\u53f7\uff1a<\/p>\n

\n

$ cat -n passwd\n<\/code><\/pre>\n<\/p>\n

nl\u547d\u4ee4\uff0c\u6dfb\u52a0\u884c\u53f7\u5e76\u590d\u5370\uff0c\u8fd9\u662f\u4e2a\u6bd4cat-n\u66f4\u4e13\u4e1a\u7684\u884c\u53f7\u590d\u5370\u547d\u4ee4\u3002<\/p>\n

\u8fd9\u513f\u7b80\u5355\u7f57\u5217\u5b83\u7684\u5e38\u7528\u7684\u51e0\u4e2a\u53c2\u6570\uff1a<\/p>\n

\n

-b : \u6307\u5b9a\u6dfb\u52a0\u884c\u53f7\u7684\u65b9\u5f0f\uff0c\u4e3b\u8981\u6709\u4e24\u79cd\uff1a<\/span>\n    -b a:\u8868\u793a\u65e0\u8bba\u662f\u5426\u4e3a\u7a7a\u884c\uff0c\u540c\u6837\u5217\u51fa\u884c\u53f7(\"cat -n\"\u5c31\u662f\u8fd9\u79cd\u65b9\u5f0f)\n    -b t:\u53ea\u5217\u51fa\u975e\u7a7a\u884c\u7684\u7f16\u53f7\u5e76\u5217\u51fa\uff08\u9ed8\u8ba4\u4e3a\u8fd9\u79cd\u65b9\u5f0f\uff09\n-n : \u8bbe\u7f6e\u884c\u53f7\u7684\u6837\u5f0f\uff0c\u4e3b\u8981\u6709\u4e09\u79cd\uff1a<\/span>\n    -n ln:\u5728\u884c\u53f7\u5b57\u6bb5\u6700\u5de6\u7aef\u663e\u793a\n    -n rn:\u5728\u884c\u53f7\u5b57\u6bb5\u6700\u53f3\u8fb9\u663e\u793a\uff0c\u4e14\u4e0d\u52a0 0\n    -n rz:\u5728\u884c\u53f7\u5b57\u6bb5\u6700\u53f3\u8fb9\u663e\u793a\uff0c\u4e14\u52a0 0\n-w : \u884c\u53f7\u5b57\u6bb5\u5360\u7528\u7684\u4f4d\u6570(\u9ed8\u8ba4\u4e3a 6 \u4f4d)<\/span>\n<\/code><\/pre>\n<\/p>\n

\u4f60\u4f1a\u53d1\u89c9\u4f7f\u7528\u8fd9\u51e0\u4e2a\u547d\u4ee4\uff0c\u9ed8\u8ba4\u7684\u7ec8\u7aef\u7a97\u53e3\u5927\u5c0f\uff0c\u4e00\u5c4f\u663e\u793a\u4e0d\u5b8c\u6587\u672c\u7684\u5185\u5bb9\uff0c\u5f97\u7528\u952e\u76d8\u62d6\u52a8\u6eda\u52a8\u6761\u6216\u5219\u6ed1\u52a8\u6eda\u8f6e\u80fd\u591f\u7ee7\u7eed\u5f80\u4e0b\u7ffb\u9875\uff0c\u8981\u662f\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528\u9f20\u6807\u64cd\u4f5c\u7ffb\u9875\u5c31\u597d\u4e86\uff0c\u8fd9\u4e48\u4f60\u5c31\u53ef\u4ee5\u4f7f\u7528\u4e0b\u8fb9\u8981\u4ecb\u7ecd\u7684\u547d\u4ee4\u3002<\/p>\n

\u4f7f\u7528more\u548cless\u547d\u4ee4\u5206\u9875\u67e5\u770b\u6587\u4ef6<\/p>\n

\u5047\u5982\u8bf4\u91cc\u9762\u7684cat\u662f\u62ff\u6765\u5feb\u901f\u67e5\u770b\u4e00\u4e2a\u6587\u4ef6\u5185\u5bb9\u7684\uff0c\u8fd9\u4e48\u8fd9\u4e2amore\u548cless\u5c31\u662f\u5929\u751f\u62ff\u6765\"\u9605\u8bfb\"\u4e00\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\u768464\u4f4dlinux\uff0c\u4f8b\u5982\u8bf4\"man\"\u6307\u5357\u5185\u90e8\u5c31\u662f\u4f7f\u7528\u7684less\u6765\u663e\u793a\u5185\u5bb9\u3002\u5176\u4e2dmore\u547d\u4ee4\u6bd4\u8f83\u7b80\u5355\uff0c\u53ea\u80fd\u5411\u4e00\u4e2a\u65b9\u5411\u6eda\u52a8\uff0c\u800c\"less\"\u4e3a\u57fa\u4e8e\"more\"\u548c\"vi\"(\u4e00\u4e2a\u5f3a\u608d\u7684\u7f16\u8f91\u5668\uff0c\u6211\u4eec\u6709\u5355\u72ec\u7684\u8bfe\u7a0b\u6765\u8ba9\u4f60\u5b66\u4e60)\u5f00\u53d1\uff0c\u529f\u80fd\u66f4\u5f3a\u608d\u3002less\u7684\u4f7f\u7528\u57fa\u672c\u548cmore\u4e00\u81f4\uff0c\u5177\u4f53\u4f7f\u7528\u8bf7\u67e5\u770bman\u6307\u5357\uff0c\u8fd9\u513f\u53ea\u4ecb\u7ecdmore\u547d\u4ee4\u7684\u4f7f\u7528\u3002<\/p>\n

\u4f7f\u7528more\u5de5\u5177\u6253\u5f00passwd\u6587\u4ef6\uff1a<\/p>\n

\n

$ more passwd\n<\/code><\/pre>\n<\/p>\n

\u6253\u5f00\u540e\u9ed8\u8ba4\u53ea\u663e\u793a\u4e00\u5c4f\u5185\u5bb9\uff0c\u7ec8\u7aef\u9876\u90e8\u663e\u793a\u5f53\u524d\u9605\u8bfb\u7684\u8fdb\u5ea6(\u6bd4\u7387)\u3002\u53ef\u4ee5\u4f7f\u7528Enter\u952e\u5411\u4e0a\u6eda\u52a8\u4e00\u884c\uff0c\u4f7f\u7528Space\u952e\u5411\u4e0a\u6eda\u52a8\u4e00\u5c4f\uff0c\u6309\u4e0bh\u663e\u793a\u5e2e\u52a9\uff0cq\u9000\u51fa\u3002<\/p>\n

\u4f7f\u7528head\u548ctail\u547d\u4ee4\u67e5\u770b\u6587\u4ef6<\/p>\n

\u8fd9\u4e24\u4e2a\u547d\u4ee4\u8fd9\u4e9b\u813e\u6c14\u6bd4\u8f83\u6025\u7684\u4eba\u5e94\u5f53\u4f1a\u6bd4\u8f83\u559c\u6b22\uff0c\u7531\u4e8e\u5b83\u4eec\u4e00\u4e2a\u662f\u53ea\u67e5\u770b\u7684\u5934\u51e0\u884c\uff08\u9ed8\u8ba4\u4e3a10\u884c\uff0c\u4e0d\u8db310\u884c\u5219\u663e\u793a\u5168\u90e8\uff09\u548c\u5c3e\u51e0\u884c\u3002\u8fd8\u662f\u62ffpasswd\u6587\u4ef6\u4e3e\u4f8b\uff0c\u4f8b\u5982\u5f53\u6211\u4eec\u60f3\u8981\u67e5\u770b\u8fd1\u6765\u65b0\u964d\u4f4e\u7684\u7528\u6237\uff0c\u8fd9\u4e48\u6211\u4eec\u53ef\u4ee5\u67e5\u770b\u8fd9\u4e2a\/etc\/passwd\u6587\u4ef6\uff0c\u4e0d\u8fc7\u6211\u4eec\u4e0a\u9762\u4e5f\u770b\u89c1\u4e86\uff0c\u8fd9\u4e2a\u6587\u4ef6\u4e0a\u9762\u4e00\u5927\u5806\u4e71\u7cdf\u7cdf\u7684\u4e1c\u897f\uff0c\u770b\u4e0a\u53bb\u5b9e\u5728\u8d39\u795e\u554a\u3002\u8fd9\u513f\u60f3\u5230\u7cfb\u7edf\u65b0\u589e\u52a0\u4e00\u4e2a\u7528\u6237\uff0c\u5e94\u5f53\u4f1a\u5c06\u7528\u6237\u7684\u4fe1\u606f\u6dfb\u52a0\u5230passwd\u6587\u4ef6\u7684\u6700\u540e\uff0c\u8fd9\u4e48\u8fd9\u65f6\u4faf\u6211\u4eec\u5c31\u53ef\u4ee5\u4f7f\u7528tail\u547d\u4ee4\u4e86\uff1a<\/p>\n

\n

$ tail \/etc\/passwd\n<\/code><\/pre>\n<\/p>\n

\u751a\u81f3\u66f4\u76f4\u63a5\u7684\u53ea\u770b\u4e00\u884c\uff0c\u52a0\u4e0a-n\u53c2\u6570\uff0c\u524d\u9762\u7d27\u968f\u884c\u6570\uff1a<\/p>\n

\n

$ tail -n 1<\/span> \/etc\/passwd\n<\/code><\/pre>\n<\/p>\n

\u5173\u4e8etail\u547d\u4ee4\uff0c\u4e0d\u5f97\u4e0d\u63d0\u7684\u8fd8\u6709\u5b83\u4e00\u4e2a\u5f88\u725b\u7684\u53c2\u6570-f\uff0c\u8fd9\u4e2a\u53c2\u6570\u53ef\u4ee5\u5b9e\u73b0\u4e0d\u505c\u5730\u8bfb\u53d6\u67d0\u4e2a\u6587\u4ef6\u7684\u5185\u5bb9\u5e76\u663e\u793a\u3002\u8fd9\u53ef\u8ba9\u6211\u4eec\u52a8\u6001\u67e5\u770b\u65e5\u5fd7\u8d77\u5230\u5b9e\u65f6\u76d1\u89c6\u7684\u4f5c\u7528\uff0c\u4e0d\u8fc7\u6211\u4e0d\u4f1a\u5728\u8fd9\u95e8\u57fa\u7840\u8bfe\u7a0b\u4e2d\u4ecb\u7ecd\u5b83\u7684\u66f4\u591a\u7ec6\u8282\uff0c\u611f\u5174\u8da3\u7684\u7528\u6237\u53ef\u4ee5\u81ea\u5df1\u53bb\u4e86\u89e3\u3002<\/p>\n

6.\u67e5\u770b\u6587\u4ef6\u7c7b\u578b<\/p>\n

\u540e\u9762\u6211\u63d0\u53ca\u8fc7\uff0c\u5728Linux\u4e0b\u8fb9\u6587\u4ef6\u7684\u7c7b\u578b\u4e0d\u662f\u6309\u7167\u6587\u4ef6\u540e\u7f00\u6765\u5224\u5b9a\u7684\uff0c\u6211\u4eec\u4e00\u822c\u4f7f\u7528file\u547d\u4ee4\u53ef\u4ee5\u67e5\u770b\u6587\u4ef6\u7684\u7c7b\u578b\uff1a<\/p>\n

\n

$ file \/bin\/ls\n<\/code><\/pre>\n<\/p>\n

\u8fd9\u8868\u793a\u8fd9\u662f\u4e00\u4e2a\u53ef\u6267\u884c\u6587\u4ef6\uff0c\u8fd0\u884c\u572864\u4f4d\u5e73\u53f0\uff0c\u5e76\u4f7f\u7528\u4e86\u52a8\u6001\u94fe\u63a5\u6587\u4ef6\uff08\u5171\u4eab\u5e93\uff09\u3002<\/p>\n

7.\u7f16\u8f91\u6587\u4ef6<\/p>\n

\u5728Linux\u4e0b\u8fb9\u7f16\u8f91\u6587\u4ef6\u4e00\u822c\u6211\u4eec\u4f1a\u76f4\u63a5\u4f7f\u7528\u4e13\u95e8\u7684\u547d\u4ee4\u884c\u7f16\u8f91\u5668\u4f8b\u5982\uff08emacs\uff0cvimlinux\u76ee\u5f55\u7ed3\u6784\u662f<\/strong>\uff0cnano\uff09\uff0c\u56e0\u4e3a\u6d89\u53caLinux\u4e0a\u7684\u7f16\u8f91\u5668\u7684\u5185\u5bb9\u6bd4\u8f83\u591a\uff0c\u4e14\u5341\u5206\u91cd\u8981\uff0c\u6545\u6211\u4eec\u6709\u4e00\u95e8\u5355\u72ec\u7684\u57fa\u7840\u8bfe\u4e13\u95e8\u4ecb\u7ecd\u8fd9\u5176\u4e2d\u4e00\u4e2a\u7f16\u8f91\u5668\uff08vim\uff09\u3002\u5728\u8fd9\u513f\u5f3a\u70c8\u5e0c\u671b\u6b63\u5728\u5b66\u4e60\u8fd9\u95e8Linux\u57fa\u7840\u8bfe\u7684\u4f60\u5148\u5728\u8fd9\u513f\u6682\u505c\u4e00\u4e0b\uff0c\u5148\u53bb\u5b66\u4e60vim\u7f16\u8f91\u5668\u7684\u4f7f\u7528\uff08\u8d77\u7801\u628a\u63e1\u57fa\u672c\u7684\u64cd\u4f5c\uff09\u4e4b\u540e\u518d\u7ee7\u7eed\u672c\u8bfe\u7a0b\u524d\u9762\u7684\u5185\u5bb9\uff0c\u7531\u4e8e\u524d\u9762\u7684\u5185\u5bb9\u4f1a\u5047\u5b9a\u4f60\u5df2\u7136\u5b66\u4f1a\u4e86vim\u7f16\u8f91\u5668\u7684\u4f7f\u7528\u3002\u5047\u5982\u4f60\u60f3\u66f4\u63a8\u52a8\u901f\u7684\u5165\u95e8\uff0c\u4f60\u53ef\u4ee5\u76f4\u63a5\u4f7f\u7528Linux\u5185\u90e8\u7684vim\u5b66\u4e60\u6559\u7a0b\uff0c\u8f93\u5165\u5982\u4e0b\u547d\u4ee4\u5373\u53ef\u5f00\u59cb\uff1a<\/p>\n

\n

$ vimtutor\n<\/code><\/pre>\n<\/p>\n

\u4f5c\u4e1a<\/p>\n

\u4f60\u662f\u4e0d\u662f\u611f\u89c9\u5728\u6211\u4eec\u7684\u73af\u5883\u5c0f\u5b66\u4e60\u89c9\u5f97\u8f7b\u677e\u6109\u5feb\u6beb\u65e0\u538b\u529b\u5462\uff0c\u6240\u4ee5\u65f6\u5e38\u5077\u5077\u61d2\u4e5f\u662f\u6ca1\u6709\u95ee\u9898\u7684\u3002\u8981\u771f\u662f\u8fd9\u6837\u53ef\u4e0d\u592a\u597d\u554a\uff0c\u8981\u5b66\u4f1a\u7ed9\u81ea\u5df1\u70b9\u538b\u529b\uff0c\u7a0d\u7a0d\u4e25\u683c\u70b9\u8981\u6c42\u81ea\u5df1\u624d\u884c\u3002\u4f60\u53c8\u4f3c\u4e4e\u4f1a\u60f3\u8981\u662f\u6709\u4eba\u80fd\u76d1\u7763\u5c31\u597d\u4e86\uff0c\u8fd9\u6837\u4f60\u80fd\u5b66\u5f97\u66f4\u5feb\u3002\u597d\u5427\u660e\u5929\u5c31\u6559\u4f60\u5982\u4f55\u53ec\u5524\u4e00\u53cc\u8033\u6735\u4e0b\u6765\u76d1\u7763\u4f60\uff1a<\/p>\n

\n

$ xeyes\n<\/code><\/pre>\n<\/p>\n

\u4f60\u53ef\u4ee5\u4f7f\u7528\u5982\u4e0b\u547d\u4ee4\u5c06\u5b83\u653e\u5728\u540e\u53f0\u8fd0\u884c<\/p>\n

\n

$ nohup xeyes &\n<\/code><\/pre><\/p>\n","protected":false},"excerpt":{"rendered":"

\u662f\u4ee5\u6811\u5f62\u76ee\u5f55\u7ed3\u6784\u7684\u5f62\u5f0f\u6765\u6784\u5efa\u6574\u4e2a\u7cfb\u7edf\u7684\uff0c\u53ef\u4ee5\u7406\u89e3\u4e3a\u4e00\u4e2a\u7528\u6237\u53ef\u64cd\u4f5c\u7cfb\u7edf\u7684\u9aa8\u67b6\u3002\u5b9a\u4e49\u4e86\u7cfb\u7edf\u4e2d\u6bcf\u4e2a\u533a\u57df\u7684\u7528\u9014\u3001\u6240\u9700\u8981\u7684\u6700\u5c0f\u6784\u6210\u7684\u6587\u4ef6\u548c\u76ee\u5f55\u540c\u65f6\u8fd8\u7ed9\u51fa\u4e86\u4f8b\u5916\u5904\u7406\u4e0e\u77db\u76fe\u5904\u7406\u3002\u7684\uff08\u4ee5\u540e\u4f1a\u8bb2\u5230\u4e00\u4e2a\u7c7b\u4f3c\u4e0d\u80fd\u7701\u7565\u7684\u60c5\u51b5\uff09\uff1b\u5982\u679c\u662f\u5f53\u524d\u76ee\u5f55\u7684\u4e0a\u4e00\u7ea7\u76ee\u5f55\uff0c\u5219\u9700\u8981\u4f7f\u7528.\u662f\u4e0d\u662f\u5f88\u65b9\u4fbf\u554a\uff0c\u5982\u679c\u5728\u56fe\u5f62\u754c\u9762\u5219\u9700\u8981\u5148\u5728\u6e90\u76ee\u5f55\u590d\u5236\u6587\u4ef6\uff0c\u518d\u8fdb\u5230\u76ee\u7684\u76ee\u5f55\u7c98\u8d34\u6587\u4ef6\uff0c\u547d\u4ee4\u884c\u64cd\u4f5c\u6b65\u9aa4\u5c31\u4e00\u6b65\u5230\u4f4d\u4e86\u561b\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[988],"tags":[999],"class_list":["post-272180","post","type-post","status-publish","format-standard","hentry","category-tougao","tag-999"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/272180","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=272180"}],"version-history":[{"count":0,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/272180\/revisions"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=272180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=272180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=272180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}