{"id":78305,"date":"2023-09-19T10:02:05","date_gmt":"2023-09-19T02:02:05","guid":{"rendered":"http:\/\/gulass.cn\/?p=78305"},"modified":"2023-09-19T10:02:05","modified_gmt":"2023-09-19T02:02:05","slug":"fast-effective-man","status":"publish","type":"post","link":"https:\/\/gulass.cn\/fast-effective-man.html","title":{"rendered":"\u5982\u4f55\u66f4\u5feb\u901f\u6709\u6548\u5730\u5229\u7528 man\uff01"},"content":{"rendered":"\n\n\n
\u5bfc\u8bfb<\/td>\n\u6211\u4eec\u901a\u5e38\u901a\u8fc7 google \u6765\u67e5\u8be2 Linux \u4e2d\u7684\u547d\u4ee4\u8bf4\u660e\uff0c\u4f46\u662f\u5176\u5b9e\u8fd8\u6709\u4e00\u4e2a\u66f4\u597d\u7684\u529e\u6cd5\uff1a\u90a3\u5c31\u662f\u901a\u8fc7 Linux \u81ea\u5e26\u7684 man \u5e2e\u52a9\u9875\u6765\u67e5\u8be2\u547d\u4ee4\u8be6\u5c3d\u5b8c\u6574\u7684\u4f7f\u7528\u8bf4\u660e\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n

man \u9875\u9762\u7684\u5386\u53f2\u672c\u8eab\u6bd4 Linux \u8fd8\u957f\uff0c\u53ef\u4ee5\u8ffd\u6eaf\u5230 Unix \u65e9\u671f\u90a3\u4e2a\u5e74\u4ee3\u3002 \u901a\u8fc7\u8fd9\u4e2a Wikipedia \u53ef\u4ee5\u77e5\u9053\uff0cDennis Ritchie \u548c Ken Thompson \u5728 1971 \u5e74\u5199\u4e86\u7b2c\u4e00\u4e2a man \u5e2e\u52a9\u9875\uff0c\u90a3\u4e2a\u5e74\u4ee3\u7684\u8ba1\u7b97\u5668\u4f7f\u7528\u7684\u8fd8\u662f\u50cf\u70e4\u7bb1\u4e00\u6837\u7684\u8ba1\u7b97\u673a\uff0c\u4e2a\u4eba\u7535\u8111\u8fd8\u672a\u51fa\u4e16\u3002man \u5e2e\u52a9\u9875\u4e5f\u6709\u5b83\u81ea\u5df1\u7684\u4e00\u5957\u8bbe\u8ba1\u7cbe\u70bc\u7684\u8bed\u6cd5\uff0c\u548c Unix \u4e0e Linux \u4e00\u6837\uff0cman \u5e2e\u52a9\u9875\u4e5f\u4e0d\u662f\u4e00\u6210\u4e0d\u53d8\u7684\uff0c\u5b83\u5c31\u50cf Linux \u5185\u6838\u4e00\u6837\u4e0d\u505c\u5730\u53d1\u5c55\u66f4\u65b0\u3002<\/p>\n

Man \u5e2e\u52a9\u9875\u901a\u8fc7\u6570\u5b57\u6807\u8bc6\u7b26\u6765\u5206\u6210\u4e0d\u540c\u7c7b\u578b\u7684\u5185\u5bb9\uff1a<\/p>\n

    \n
  1. \u4e00\u822c\u7528\u6237\u547d\u4ee4<\/li>\n
  2. \u7cfb\u7edf\u8c03\u7528\u547d\u4ee4<\/li>\n
  3. \u5e93\u51fd\u6570<\/li>\n
  4. \u7279\u6b8a\u7684\u6587\u4ef6\u548c\u9a71\u52a8\u7a0b\u5e8f<\/li>\n
  5. \u6587\u4ef6\u683c\u5f0f<\/li>\n
  6. \u6e38\u620f\u548c\u5c4f\u4fdd<\/li>\n
  7. \u6742\u9879<\/li>\n
  8. \u7cfb\u7edf\u7ba1\u7406\u547d\u4ee4\u548c\u5b88\u62a4\u8fdb\u7a0b<\/li>\n<\/ol>\n

    \u5c3d\u7ba1\u5982\u6b64\uff0c\u7528\u6237\u4e00\u822c\u4e5f\u4e0d\u9700\u8981\u77e5\u9053\u4ed6\u4eec\u60f3\u67e5\u8be2\u7684\u547d\u4ee4\u662f\u5c5e\u4e8e\u54ea\u4e00\u4e2a\u7c7b\u578b\u7684\u3002<\/p>\n

    \u8fd9\u4e9b\u6587\u4ef6\u683c\u5f0f\u5316\u7684\u65b9\u5f0f\u5728\u5f53\u4eca\u8bb8\u591a\u7528\u6237\u770b\u6765\u6709\u70b9\u53e4\u602a\u3002\u56e0\u4e3a\u6700\u5f00\u59cb\u4ed6\u4eec\u662f\u7528 trooff \u7684\u65b9\u5f0f\uff0c\u901a\u8fc7 PostScript \u6253\u5370\u673a\u6765\u6253\u5370\uff0c\u6240\u4ee5\u5305\u542b\u4e86\u5934\u90e8\u548c\u5e03\u5c40\u65b9\u9762\u7684\u683c\u5f0f\u5316\u4fe1\u606f\u3002\u5728 Linux \u4e2d\uff0c\u53d6\u800c\u4ee3\u4e4b\u4f7f\u7528\u4e86\u4e00\u79cd\u53eb\u505a groff \u7684\u65b9\u6cd5\u3002<\/p>\n

    \u5728\u6211\u7684 Fedora \u7cfb\u7edf\u4e2d\uff0cman \u5e2e\u52a9\u9875\u76f8\u5173\u7684\u6587\u4ef6\u5b58\u50a8\u5728 \/usr\/share\/man \u4e0b\u7684\u5b50\u76ee\u5f55\u4e2d\uff08\u6bd4\u5982 man1 \u5b58\u50a8\u7b2c\u4e00\u90e8\u5206\u7684\u547d\u4ee4\uff09\uff0c\u8fd8\u6709\u8fdb\u4e00\u6b65\u7684\u5b50\u76ee\u5f55\u7528\u4e8e\u5b58\u50a8 man \u5e2e\u52a9\u9875\u7684\u7ffb\u8bd1\u3002<\/p>\n

    \u5982\u679c\u4f60\u5728 Shell \u4e2d\u67e5\u627e man \u547d\u4ee4\u7684 man \u5e2e\u52a9\u9875\uff0c\u4f60\u65f6\u95f4\u770b\u5230\u5c06\u662f gzip \u5de5\u5177\u538b\u7f29\u7684 man.1.gz \u6587\u4ef6\u3002\u60f3\u8981\u67e5\u8be2 man \u5e2e\u52a9\u9875\uff0c\u9700\u8981\u8f93\u5165\u7c7b\u4f3c\u5982\u4e0b\u547d\u4ee4\uff1a<\/p>\n

    man man<\/pre>\n

    \u8fd9\u4e2a\u4f8b\u5b50\u4f1a\u663e\u793a man \u547d\u4ee4\u7684 man \u5e2e\u52a9\u9875\uff0c\u8fd9\u5c06\u5148\u89e3\u538b man \u5e2e\u52a9\u9875\u6587\u4ef6\uff0c\u7136\u540e\u89e3\u91ca\u683c\u5f0f\u5316\u6307\u4ee4\u5e76\u7528 less \u663e\u793a\u7ed3\u679c\uff0c\u6240\u4ee5\u5bfc\u822a\u64cd\u4f5c\u548c\u5728 less \u4e2d\u4e00\u6837\u3002<\/p>\n

    \u6240\u6709\u7684 man \u5e2e\u52a9\u9875\u90fd\u5e94\u8be5\u663e\u793a\u8fd9\u4e9b\u5b50\u6bb5\u843d\uff1aName\u3001 Synopsis\u3001 Description\u3001Examples\u3001See\u3001Also\u3002\u6709\u4e9b\u8fd8\u4f1a\u6dfb\u52a0\u4e00\u4e9b\u989d\u5916\u7684\u5b50\u6bb5\u843d\uff0c\u6bd4\u5982 Options\u3001 Exit\u3001Status\u3001 Environment\u3001Bugs\u3001Files\u3001Author\u3001Reporting\u3001Bugs\u3001History\u3001Copyright\u3002<\/p>\n

    \u8be6\u7ec6\u8bf4\u660e\u4e00\u4e2a man \u5e2e\u52a9\u9875<\/strong><\/div>\n

    \u4e3a\u4e86\u66f4\u8be6\u7ec6\u5730\u4ecb\u7ecd\u4e00\u4e2a\u5178\u578b\u7684 man \u5e2e\u52a9\u9875\uff0c\u5c31\u7528 ls \u547d\u4ee4\u7684\u5e2e\u52a9\u9875\u6765\u5206\u6790\u5427\uff0c\u5728 Name \u5206\u6bb5\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u5982\u4e0b\u5185\u5bb9\uff1a<\/p>\n

    ls - list directory contents<\/pre>\n

    \u5b83\u4f1a\u7b80\u8981\u5730\u544a\u8bc9\u6211 ls \u8fd9\u6761\u547d\u4ee4\u7684\u4f5c\u7528.<\/p>\n

    \u5728 Synopsis \u5206\u6bb5\u4e0b\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u5982\u4e0b\u7684\u5185\u5bb9:<\/p>\n

    ls [OPTION]... [FILE]\u2026<\/pre>\n

    \u4efb\u4f55\u5728\u4e2d\u62ec\u53f7\u4e2d\u7684\u5143\u7d20\u90fd\u662f\u53ef\u9009\u7684\u3002\u4f60\u53ef\u4ee5\u53ea\u8f93\u5165 ls \u547d\u4ee4\uff0c\u540e\u9762\u4e0d\u63a5\u4efb\u4f55\u53c2\u6570\u3002\u53c2\u6570\u540e\u9762\u7684\u7701\u7565\u53f7\u8868\u793a\u4f60\u53ef\u4ee5\u6dfb\u52a0\u4efb\u610f\u591a\u4e2a\u5f7c\u6b64\u517c\u5bb9\u7684\u53c2\u6570\uff0c\u4ee5\u53ca\u8bb8\u591a\u6587\u4ef6\u540d\u3002\u5bf9\u4e8e [FILE] \u53c2\u6570\uff0c\u4f60\u53ef\u4ee5\u6307\u5b9a\u5177\u4f53\u7684\u76ee\u5f55\u540d\uff0c\u6216\u8005\u53ef\u4ee5\u4f7f\u7528\u901a\u914d\u7b26 *\uff0c\u6bd4\u5982\u8fd9\u4e2a\u4f8b\u5b50\uff0c\u5b83\u4f1a\u663e\u793a Documents \u6587\u4ef6\u5939\u4e0b\u7684 .txt \u6587\u4ef6\uff1a<\/p>\n

    ls Documents\/*.txt<\/pre>\n

    \u5728 Description \u5206\u6bb5\u4e0b, \u6211\u4eec\u53ef\u4ee5\u770b\u5230\u5173\u4e8e\u8fd9\u6761\u547d\u4ee4\u66f4\u52a0\u8be6\u7ec6\u7684\u4fe1\u606f\uff0c\u8fd8\u6709\u5173\u4e8e\u8fd9\u6761\u547d\u4ee4\u5404\u4e2a\u53c2\u6570\u4f5c\u7528\u7684\u8be6\u7ec6\u4ecb\u7ecd\u7684\u5217\u8868\uff0c\u6bd4\u5982\u8bf4 ls \u547d\u4ee4\u7b2c\u4e00\u4e2a\u9009\u9879 -a \u53c2\u6570\uff0c\u5b83\u7684\u4f5c\u7528\u662f\u663e\u793a\u5305\u62ec\u9690\u85cf\u6587\u4ef6\/\u76ee\u5f55\u5728\u5185\u7684\u6240\u6709\u6587\u4ef6\uff1a<\/p>\n

    -a, --all<\/pre>\n

    \u5982\u679c\u6211\u4eec\u60f3\u7528\u8fd9\u4e9b\u53c2\u6570\uff0c\u8981\u4e48\u7528\u5b83\u4eec\u7684\u522b\u540d\uff0c\u6bd4\u5982 -a\uff0c\u8981\u4e48\u7528\u5b83\u4eec\u7684\u5168\u540d\uff0c\u6bd4\u5982 --all\uff08\u4e24\u6761\u4e2d\u5212\u7ebf\uff09\u3002\u7136\u800c\u5e76\u4e0d\u662f\u6240\u6709\u53c2\u6570\u90fd\u6709\u5168\u540d\u548c\u522b\u540d\uff08\u6bd4\u5982 --author \u53ea\u6709\u4e00\u79cd\uff09\uff0c\u800c\u4e14\u4e24\u8005\u7684\u540d\u5b57\u5e76\u4e0d\u603b\u662f\u76f8\u4e92\u5173\u8054\u7684\uff08-F \u548c --classify\uff09\u3002\u5f53\u4f60\u60f3\u7528\u591a\u4e2a\u53c2\u6570\u65f6\uff0c\u8981\u4e48\u4ee5\u7a7a\u683c\u9694\u5f00\uff0c\u8981\u4e48\u5171\u7528\u4e00\u4e2a\u8fde\u5b57\u7b26 -\uff0c\u5728\u8fde\u5b57\u7b26\u540e\u8fde\u7eed\u8f93\u5165\u4f60\u9700\u8981\u7684\u53c2\u6570\uff08\u4e0d\u8981\u6dfb\u52a0\u7a7a\u683c\uff09\u3002\u6bd4\u5982\u4e0b\u9762\u4e24\u4e2a\u7b49\u4ef7\u7684\u4f8b\u5b50\uff1a<\/p>\n

    ls -a -d -l\r\nls -adl<\/pre>\n

    \u4f46\u662f tar \u8fd9\u4e2a\u547d\u4ee4\u6709\u4e9b\u4f8b\u5916\uff0c\u7531\u4e8e\u4e00\u4e9b\u5386\u53f2\u9057\u7559\u539f\u56e0\uff0c\u5f53\u53c2\u6570\u4f7f\u7528\u522b\u540d\u65f6\u53ef\u4ee5\u4e0d\u7528\u6dfb\u52a0\u8fde\u5b57\u7b26 -\uff0c\u56e0\u6b64\u4ee5\u4e0b\u4e24\u79cd\u547d\u4ee4\u90fd\u662f\u5408\u6cd5\u7684\uff1a<\/p>\n

    tar -cvf filearchive.tar thisdirectory\/\r\ntar cvf filearchive.tar thisdirectory\/<\/pre>\n

    ls \u7684 Description \u5206\u6bb5\u540e\u662f Author\u3001Reporting Bugs\u3001Copyright\u3001 See Also \u7b49\u5206\u6bb5\u3002<\/p>\n

    See Also \u5206\u6bb5\u4f1a\u63d0\u4f9b\u4e00\u4e9b\u76f8\u5173\u7684 man \u5e2e\u52a9\u9875\uff0c\u6ca1\u4e8b\u7684\u8bdd\u53ef\u4ee5\u770b\u770b\u3002\u6bd5\u7adf\u9664\u4e86\u547d\u4ee4\u5916\u8fd8\u6709\u8bb8\u591a\u5176\u4ed6\u7c7b\u578b\u7684 man \u5e2e\u52a9\u9875\u3002<\/p>\n

    \u6709\u4e00\u4e9b\u547d\u4ee4\u4e0d\u662f\u7cfb\u7edf\u547d\u4ee4\uff0c\u800c\u662f Bash \u7279\u6709\u7684\uff0c\u6bd4\u5982 alias \u548c cd\u3002\u8fd9\u4e9b Bash \u7279\u6709\u7684\u547d\u4ee4\u53ef\u4ee5\u5728 BASH_BUILTINS man \u5e2e\u52a9\u9875\u4e2d\u67e5\u770b\uff0c\u548c\u4e0a\u9762\u7684\u6bd4\u8d77\u6765\u5b83\u4eec\u7684\u63cf\u8ff0\u66f4\u52a0\u7cbe\u70bc\uff0c\u4e0d\u8fc7\u5185\u5bb9\u90fd\u662f\u7c7b\u4f3c\u7684\u3002<\/p>\n

    \u5176\u5b9e\u901a\u8fc7 man \u5e2e\u52a9\u9875\u8ba9\u4f60\u53ef\u4ee5\u83b7\u5f97\u5927\u91cf\u6709\u7528\u7684\u4fe1\u606f\uff0c\u7279\u522b\u662f\u5f53\u4f60\u60f3\u7528\u4e00\u4e2a\u5df2\u7ecf\u5f88\u4e45\u6ca1\u7528\u8fc7\u7684\u547d\u4ee4\uff0c\u9700\u8981\u590d\u4e60\u4e0b\u8fd9\u6761\u547d\u4ee4\u7684\u4f5c\u7528\u65f6\u3002\u8fd9\u4e2a\u65f6\u5019 man \u5e2e\u52a9\u9875\u9971\u53d7\u975e\u8bae\u7684\u7b80\u6d01\u6027\u53cd\u800c\u5bf9\u4f60\u6765\u8bf4\u662f\u66f4\u597d\u7684\u3002<\/p>\n


    \n

    via: https:\/\/opensource.com\/article\/17\/7\/using-man-pages<\/a><\/p>\n

    \u4f5c\u8005\uff1aGreg Pittman<\/a> \u8bd1\u8005\uff1a\u5434\u9704\/toyijiu<\/a> \u6821\u5bf9\uff1awxy<\/a><\/p>\n

    \u672c\u6587\u7531 LCTT<\/a> \u539f\u521b\u7f16\u8bd1\uff0cLinux\u4e2d\u56fd<\/a> \u8363\u8a89\u63a8\u51fa<\/p>\n

    \n

    \u539f\u6587\u6765\u81ea\uff1ahttps:\/\/linux.cn\/article-8722-1.html<\/a><\/p>\n

    \u672c\u6587\u5730\u5740\uff1ahttp:\/\/gulass.cn\/fast-effective-man.html<\/a>\u7f16\u8f91\uff1a\u9ad8\u519b\uff0c\u5ba1\u6838\u5458\uff1a\u9004\u589e\u5b9d<\/span><\/p>\n<\/blockquote>\n","protected":false},"excerpt":{"rendered":"

    \u5bfc\u8bfb \u6211\u4eec\u901a\u5e38\u901a\u8fc7 google \u6765\u67e5\u8be2 Linux \u4e2d\u7684\u547d\u4ee4\u8bf4\u660e\uff0c\u4f46\u662f\u5176\u5b9e\u8fd8\u6709\u4e00\u4e2a\u66f4\u597d\u7684\u529e\u6cd5\uff1a\u90a3\u5c31\u662f\u901a\u8fc7 L […]<\/p>\n","protected":false},"author":63,"featured_media":78309,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-78305","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/78305","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/comments?post=78305"}],"version-history":[{"count":4,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/78305\/revisions"}],"predecessor-version":[{"id":78345,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/posts\/78305\/revisions\/78345"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media\/78309"}],"wp:attachment":[{"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/media?parent=78305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/categories?post=78305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gulass.cn\/wp-json\/wp\/v2\/tags?post=78305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}