{"id":673,"date":"2018-06-07T09:15:59","date_gmt":"2018-06-07T01:15:59","guid":{"rendered":"http:\/\/jqnets.com\/blog\/?p=673"},"modified":"2019-09-18T09:29:27","modified_gmt":"2019-09-18T01:29:27","slug":"linux%e6%8c%87%e4%bb%a4-ln-%e6%8c%87%e4%bb%a4","status":"publish","type":"post","link":"https:\/\/jqnets.com\/blog\/linux%e6%8c%87%e4%bb%a4-ln-%e6%8c%87%e4%bb%a4\/","title":{"rendered":"Linux\u6307\u4ee4- ln \u6307\u4ee4"},"content":{"rendered":"<p>\n\t<strong><span style=\"color:#008080;\">\u547d\u4ee4\u683c\u5f0f\uff1a<\/span><\/strong>\n<\/p>\n<p>\n\t<span style=\"color:#000080;\"><strong>ln &nbsp;[\u53c3\u6578] [\u539f\u59cb\u6a94\u6848\u6848\u6216\u76ee\u9304] [\u76ee\u6a19\u6a94\u6848\u6216\u76ee\u9304]<\/strong><\/span>\n<\/p>\n<p>\n\t<span style=\"color:#000000;\"><strong>\u7bc4\u4f8b\uff1aln -s src goal_path<\/strong><\/span>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<strong><span style=\"color:#008080;\">\u547d\u4ee4\u53c3\u6578\uff1a<\/span><\/strong>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<strong>\u25a0 \u5fc5\u8981\u53c3\u6578:<\/strong>\n<\/p>\n<p>\n\t-b \u522a\u9664\uff0c\u8986\u84cb\u4ee5\u524d\u5efa\u7acb\u7684\u93c8\u7d50\n<\/p>\n<p>\n\t-d \u5141\u8a31\u8d85\u7d1a\u7528\u6236\u88fd\u4f5c\u76ee\u9304\u7684\u786c\u93c8\u7d50\n<\/p>\n<p>\n\t-f \u5f37\u5236\u57f7\u884c\n<\/p>\n<p>\n\t-i \u4ea4\u4e92\u6a21\u5f0f\uff0c\u6a94\u6848\u5b58\u5728\u5247\u63d0\u793a\u7528\u6236\u662f\u5426\u8986\u84cb\n<\/p>\n<p>\n\t-n \u628a\u7b26\u865f\u93c8\u7d50\u8996\u70ba\u4e00\u822c\u76ee\u9304\n<\/p>\n<p>\n\t-s \u8edf\u93c8\u7d50(\u7b26\u865f\u93c8\u7d50)\n<\/p>\n<p>\n\t-v \u986f\u793a\u8a73\u7d30\u7684\u8655\u7406\u904e\u7a0b\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<strong>\u25a0 \u9078\u64c7\u53c3\u6578:<\/strong>\n<\/p>\n<p>\n\t-S &ldquo;-S&lt;\u5b57\u5c3e\u5099\u4efd\u5b57\u4e32&gt; &rdquo;\u6216 &ldquo;&#8211;suffix=&lt;\u5b57\u5c3e\u5099\u4efd\u5b57\u4e32&gt;&rdquo;\n<\/p>\n<p>\n\t-V &ldquo;-V&lt;\u5099\u4efd\u65b9\u5f0f&gt;&rdquo;\u6216&ldquo;&#8211;version-control=&lt;\u5099\u4efd\u65b9\u5f0f&gt;&rdquo;\n<\/p>\n<p>\n\t&#8211;help \u986f\u793a\u5e6b\u52a9\u8cc7\u8a0a\n<\/p>\n<p>\n\t&#8211;version \u986f\u793a\u7248\u672c\u8cc7\u8a0a\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<span style=\"color:#2F4F4F;\"><strong>\u7c21\u4ecb\uff1a<\/strong><\/span>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\tln \u662f linux\u4e2d\u53c8\u4e00\u500b\u975e\u5e38\u91cd\u8981\u547d\u4ee4\uff0c\u5b83\u7684\u529f\u80fd\u662f\u70ba\u67d0\u4e00\u500b\u6a94\u6848\u5728\u53e6\u5916\u4e00\u500b\u4f4d\u7f6e\u5efa\u7acb\u4e00\u500b\u540c\u6b65\u7684\u93c8\u7d50\u3002\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t\u7576\u6211\u5011\u9700\u8981\u5728\u4e0d\u540c\u7684\u76ee\u9304\uff0c\u7528\u5230\u76f8\u540c\u7684\u6a94\u6848\u6642\uff0c\u6211\u5011\u4e0d\u9700\u8981\u5728\u6bcf\u4e00\u500b\u9700\u8981\u7684\u76ee\u9304\u4e0b\u90fd\u653e\u4e00\u500b\u5fc5\u9808\u76f8\u540c\u7684\u6a94\u6848\uff0c\u6211\u5011\u53ea\u8981\u5728\u67d0\u500b\u56fa\u5b9a\u7684\u76ee\u9304\uff0c\u653e\u4e0a\u8a72\u6a94\u6848\uff0c\u7136\u5f8c\u5728 \u5176\u4ed6\u7684\u76ee\u9304\u4e0b\u7528 ln \u547d\u4ee4\u93c8\u7d50\uff08link\uff09\u5b83\u5c31\u53ef\u4ee5\uff0c\u4e0d\u5fc5\u91cd\u8907\u7684\u4f54\u7528\u78c1\u789f\u7a7a\u9593\u3002\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\tLinux\u6a94\u6848\u7cfb\u7d71\u4e2d\uff0c\u6709\u6240\u8b02\u7684\u93c8\u7d50(link)\uff0c\u6211\u5011\u53ef\u4ee5\u5c07\u5176\u8996\u70ba\u6a94\u6848\u6848\u7684\u5225\u540d\uff0c\u800c\u93c8\u7d50\u53c8\u53ef\u5206\u70ba\u5169\u7a2e : \u786c\u93c8\u7d50 ( hard link ) \u8207\u8edf\u93c8\u7d50 ( symbolic link )\uff0c\u786c\u93c8\u7d50\u7684\u610f\u601d\u662f\u4e00\u500b\u6a94\u6848\u6848\u53ef\u4ee5\u6709\u591a\u500b\u540d\u7a31\uff0c\u800c\u8edf\u93c8\u7d50\u7684\u65b9\u5f0f\u5247\u662f\u7522\u751f\u4e00\u500b\u7279\u6b8a\u7684\u6a94\u6848\u6848\uff0c\u8a72\u6a94\u6848\u6848\u7684\u5167\u5bb9\u662f\u6307\u5411\u53e6\u4e00\u500b\u6a94\u6848\u6848\u7684\u4f4d\u7f6e\u3002\u786c\u93c8\u7d50\u662f\u5b58\u5728\u540c\u4e00\u500b\u6a94\u6848\u7cfb\u7d71\u4e2d\uff0c\u800c\u8edf\u93c8\u7d50\u537b\u53ef\u4ee5\u8de8\u8d8a\u4e0d\u540c\u7684\u6a94\u6848\u7cfb\u7d71\u3002\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<strong>\u8edf\u93c8\u7d50\uff1a<\/strong>\n<\/p>\n<ol>\n<li>\n<p>\n\t\t\t\u8edf\u93c8\u7d50\uff0c\u4ee5\u8def\u5f91\u7684\u5f62\u5f0f\u5b58\u5728\u3002\u985e\u4f3c\u65bcWindows\u4f5c\u696d\u7cfb\u7d71\u4e2d\u7684\u5feb\u6377\u65b9\u5f0f\n\t\t<\/p>\n<\/li>\n<li>\n<p>\n\t\t\t\u8edf\u93c8\u7d50\u53ef\u4ee5 \u8de8\u6a94\u6848\u7cfb\u7d71 \uff0c\u786c\u93c8\u7d50\u4e0d\u53ef\u4ee5\u3002\n\t\t<\/p>\n<\/li>\n<li>\n<p>\n\t\t\t\u8edf\u93c8\u7d50\u53ef\u4ee5\u5c0d\u4e00\u500b\u4e0d\u5b58\u5728\u7684\u6a94\u6848\u6848\u540d\u9032\u884c\u93c8\u7d50\u3002\n\t\t<\/p>\n<\/li>\n<li>\n<p>\n\t\t\t\u8edf\u93c8\u7d50\u53ef\u4ee5\u5c0d\u76ee\u9304\u9032\u884c\u93c8\u7d50\u3002\n\t\t<\/p>\n<\/li>\n<\/ol>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t\u786c\u93c8\u7d50:\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<ol>\n<li>\n<p>\n\t\t\t\u786c\u93c8\u7d50\uff0c\u4ee5\u6a94\u6848\u526f\u672c\u7684\u5f62\u5f0f\u5b58\u5728\u3002\u4f46\u4e0d\u4f54\u7528\u5be6\u969b\u7a7a\u9593\u3002\n\t\t<\/p>\n<\/li>\n<li>\n<p>\n\t\t\t\u4e0d\u5141\u8a31\u7d66\u76ee\u9304\u5275\u5efa\u786c\u93c8\u7d50\n\t\t<\/p>\n<\/li>\n<li>\n<p>\n\t\t\t\u786c\u93c8\u7d50\u53ea\u6709\u5728\u540c\u4e00\u500b\u6a94\u6848\u7cfb\u7d71\u4e2d\u624d\u80fd\u5275\u5efa\n\t\t<\/p>\n<\/li>\n<\/ol>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<strong>\u9019\u88cf\u6709\u5169\u9ede\u8981\u6ce8\u610f\uff1a<\/strong>\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<ol>\n<li>\n<p>\n\t\t\t\u7b2c\u4e00\uff0cln\u547d\u4ee4\u6703\u4fdd\u6301\u6bcf\u4e00\u8655\u93c8\u7d50\u6a94\u6848\u7684\u540c\u6b65\u6027\uff0c\u4e5f\u5c31\u662f\u8aaa\uff0c\u4e0d\u8ad6\u4f60\u6539\u52d5\u4e86\u54ea\u4e00\u8655\uff0c\u5176\u4ed6\u7684\u6a94\u6848\u90fd\u6703\u767c\u751f\u76f8\u540c\u7684\u8b8a\u5316\uff1b\n\t\t<\/p>\n<\/li>\n<li>\n<p>\n\t\t\t\u7b2c\u4e8c\uff0cln \u7684\u93c8\u7d50\u53c8\u5206\u8edf\u93c8\u7d50\u548c\u786c\u93c8\u7d50\u5169\u7a2e\uff0c\u8edf\u93c8\u7d50\u5c31\u662fln &ndash;s \u539f\u59cb\u6a94\u6848\u6848 \u76ee\u6a19\u6a94\u6848\uff0c\u5b83\u53ea\u6703\u5728\u4f60\u9078\u5b9a\u7684\u4f4d\u7f6e\u4e0a\u751f\u6210\u4e00\u500b\u6a94\u6848\u7684\u93e1\u50cf\uff0c\u4e0d\u6703\u4f54\u7528\u78c1\u789f\u7a7a\u9593\uff0c\u786c\u93c8\u7d50 ln \u539f\u59cb\u6a94\u6848\u6848 \u76ee\u6a19\u6a94\u6848\uff0c\u6c92\u6709\u53c3\u6578-s\uff0c \u5b83\u6703\u5728\u4f60\u9078\u5b9a\u7684\u4f4d\u7f6e\u4e0a\u751f\u6210\u4e00\u500b\u548c\u539f\u59cb\u6a94\u6848\u6848\u5927\u5c0f\u76f8\u540c\u7684\u6a94\u6848\uff0c\u7121\u8ad6\u662f\u8edf\u93c8\u7d50\u9084\u662f\u786c\u93c8\u7d50\uff0c\u6a94\u6848\u90fd\u4fdd\u6301\u540c\u6b65\u8b8a\u5316\u3002\n\t\t<\/p>\n<\/li>\n<\/ol>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\tln \u6307\u4ee4\u7528\u5728\u93c8\u7d50\u6a94\u6848\u6216\u76ee\u9304\uff0c\u5982\u540c\u6642\u6307\u5b9a\u5169\u500b\u4ee5\u4e0a\u7684\u6a94\u6848\u6216\u76ee\u9304\uff0c\u4e14\u6700\u5f8c\u7684\u76ee\u7684\u5730\u662f\u4e00\u500b\u5df2\u7d93\u5b58\u5728\u7684\u76ee\u9304\uff0c\u5247\u6703\u628a\u524d\u9762\u6307\u5b9a\u7684\u6240\u6709\u6a94\u6848\u6216\u76ee\u9304\u8907\u88fd\u5230\u8a72\u76ee\u9304\u4e2d\u3002\u82e5\u540c\u6642\u6307\u5b9a\u591a\u500b\u6a94\u6848\u6216\u76ee\u9304\uff0c\u4e14\u6700\u5f8c\u7684\u76ee\u7684\u5730\u4e26\u975e\u662f\u4e00\u500b\u5df2\u5b58\u5728\u7684\u76ee\u9304\uff0c\u5247\u6703\u51fa\u73fe\u932f\u8aa4\u8cc7\u8a0a\u3002\n<\/p>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t<strong>\u8a3b\uff1a<\/strong>\n<\/p>\n<ul>\n<li>\n<p>\n\t\t\t\u539f\u59cb\u6a94\u6848\u6848\u88ab\u522a\u9664\u5f8c\uff0c\u4e26\u6c92\u6709\u5f71\u97ff\u786c\u93c8\u7d50\u6a94\u6848\uff1b\u8edf\u93c8\u7d50\u6a94\u6848\u5728centos\u7cfb\u7d71\u4e0b\u4e0d\u65b7\u7684\u9583\u720d\uff0c\u63d0\u793a\u539f\u59cb\u6a94\u6848\u6848\u5df2\u7d93\u4e0d\u5b58\u5728\u3002\n\t\t<\/p>\n<\/li>\n<li>\n<p>\n\t\t\t\u91cd\u5efa\u539f\u59cb\u6a94\u6848\u6848\u5f8c\uff0c\u8edf\u93c8\u7d50\u4e0d\u5728\u9583\u720d\u63d0\u793a\uff0c\u8aaa\u660e\u5df2\u7d93\u93c8\u7d50\u6210\u529f\uff0c\u627e\u5230\u4e86\u93c8\u7d50\u6a94\u6848\u7cfb\u7d71\uff1b\u91cd\u5efa\u5f8c\uff0c\u786c\u93c8\u7d50\u6a94\u6848\u4e26\u6c92\u6709\u53d7\u5230\u539f\u59cb\u6a94\u6848\u6848\u5f71\u97ff\uff0c\u786c\u93c8\u7d50\u6a94\u6848\u7684\u5167\u5bb9\u9084\u662f\u4fdd\u7559\u4e86\u522a\u9664\u524d\u539f\u59cb\u6a94\u6848\u6848\u7684\u5167\u5bb9\uff0c\u8aaa\u660e\u786c\u93c8\u7d50\u5df2\u7d93\u5931\u6548\u3002\n\t\t<\/p>\n<\/li>\n<li>\n<p>\n\t\t\t\u76ee\u9304\u53ea\u80fd\u5275\u5efa\u8edf\u93c8\u7d50\uff1a\n\t\t<\/p>\n<\/li>\n<li>\n<ul>\n<li>\n<p>\n\t\t\t\t\t\u76ee\u9304\u5275\u5efa\u93c8\u7d50\u5fc5\u9808\u7528\u7d55\u5c0d\u8def\u5f91\uff0c\u76f8\u5c0d\u8def\u5f91\u5275\u5efa\u6703\u4e0d\u6210\u529f\uff0c\u6703\u63d0\u793a\uff1a\u7b26\u865f\u9023\u63a5\u7684\u5c64\u6578\u904e\u591a \u9019\u6a23\u7684\u932f\u8aa4\n\t\t\t\t<\/p>\n<\/li>\n<li>\n<p>\n\t\t\t\t\t\u5728\u93c8\u7d50\u76ee\u6a19\u76ee\u9304\u4e2d\u4fee\u6539\u6a94\u6848\u90fd\u6703\u5728\u539f\u59cb\u6a94\u6848\u6848\u76ee\u9304\u4e2d\u540c\u6b65\u8b8a\u5316\n\t\t\t\t<\/p>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u547d\u4ee4\u683c\u5f0f\uff1a ln &nbsp;[\u53c3\u6578] [\u539f\u59cb\u6a94\u6848\u6848\u6216\u76ee\u9304] [\u76ee\u6a19\u6a94\u6848\u6216\u76ee\u9304] \u7bc4\u4f8b\uff1aln -s src goal_path &nbsp; \u547d\u4ee4\u53c3\u6578\uff1a &nbsp; \u25a0 \u5fc5\u8981\u53c3\u6578: -b \u522a\u9664\uff0c\u8986\u84cb\u4ee5\u524d\u5efa\u7acb\u7684\u93c8\u7d50 -d \u5141\u8a31\u8d85\u7d1a\u7528\u6236\u88fd\u4f5c\u76ee\u9304\u7684\u786c\u93c8\u7d50 -f \u5f37\u5236\u57f7\u884c -i \u4ea4\u4e92\u6a21\u5f0f\uff0c\u6a94\u6848\u5b58\u5728\u5247\u63d0\u793a\u7528\u6236\u662f\u5426\u8986\u84cb -n \u628a\u7b26\u865f\u93c8\u7d50\u8996\u70ba\u4e00\u822c\u76ee\u9304 -s \u8edf\u93c8\u7d50(\u7b26\u865f\u93c8\u7d50) -v \u986f\u793a\u8a73\u7d30\u7684\u8655\u7406\u904e\u7a0b &nbsp; \u25a0 \u9078\u64c7\u53c3\u6578: -S &ldquo;-S&lt;\u5b57\u5c3e\u5099\u4efd\u5b57\u4e32&gt; &rdquo;\u6216 &#038;l [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[3,251],"tags":[211,212,195],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p6rhcT-aR","jetpack-related-posts":[],"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts\/673"}],"collection":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/comments?post=673"}],"version-history":[{"count":1,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts\/673\/revisions"}],"predecessor-version":[{"id":674,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/posts\/673\/revisions\/674"}],"wp:attachment":[{"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/media?parent=673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/categories?post=673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jqnets.com\/blog\/wp-json\/wp\/v2\/tags?post=673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}