<\/p>\n
Pixelated word Linux made from cubes, mosaic pattern<\/p>\n<\/div>\n
\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 ln \u547d\u4ee4\u6765\u521b\u5efa\u8f6f\u8fde\u63a5\uff0c\u90a3\u4e48\u600e\u6837\u5220\u9664\u5462\uff1f<\/p>\n
Linux \u4e2d\u6ca1\u6709\u7528\u4e8e\u5220\u9664\u7b26\u53f7\u94fe\u63a5\u7684\u7279\u6b8a\u547d\u4ee4\uff0c\u4e0d\u8fc7\u53ef\u4ee5\u4f7f\u7528 rm \u547d\u4ee4\uff0c\u8be5\u547d\u4ee4\u4e3b\u8981\u7528\u4e8e\u5220\u9664\u6587\u4ef6\u548c\u76ee\u5f55\uff0c\u5982\u4e0b\uff1a<\/p>\n
rm symbolic_link_name\r\n<\/pre>\n\u5f53\u7136\u4e5f\u53ef\u4ee5\u4f7f\u7528 unlink \u547d\u4ee4\uff0c\u4f46\u662f\u4e0d\u8981\u76f4\u63a5\u4f7f\u7528\u8f6f\u94fe\u63a5\u7684\u540d\u79f0\uff0c\u56e0\u4e3a\u5b83\u4e0d\u4ec5\u4ec5\u7528\u4e8e\u5220\u9664\u94fe\u63a5\uff0c\u8fd8\u4f1a\u5220\u9664\u6587\u4ef6\u3002<\/p>\n
unlink symbolic_link_name\r\n<\/pre>\n\u4e0b\u9762\u6211\u4eec\u6765\u8be6\u7ec6\u770b\u4e00\u4e0b\u3002<\/p>\n
\u4f7f\u7528 rm \u547d\u4ee4\u5220\u9664\u7b26\u53f7\u94fe\u63a5<\/strong><\/div>\n\u5728 rm \u547d\u4ee4\u540e\u9762\u63d0\u4f9b\u94fe\u63a5\u8def\u5f84\u7684\u540d\u79f0\uff1a<\/p>\n
rm name_or_path_of_link\r\n<\/pre>\n\u6211\u4eec\u6765\u770b\u4e2a\u5177\u4f53\u4f8b\u5b50\uff0c\u5982\u4e0b\u547d\u4ee4\u4e2d\u5217\u51fa\u5f53\u524d\u8def\u5f84\u4e2d\u7684\u6587\u4ef6\uff1a<\/p>\n
$ ls -l\r\ntotal 4708\r\n-rw-rw-r-- 1 abhishek abhishek 4794657 Sep 27 20:36 export.json\r\n-rw-rw-r-- 1 abhishek abhishek 311 Sep 22 12:19 line.txt\r\nlrwxrwxrwx 1 abhishek abhishek 26 Oct 17 11:24 mylink -> .\/Documents\/sample-mark.md\r\n-rw-rw-r-- 1 abhishek abhishek 106 Sep 27 20:39 redirects.json\r\n-rw-r--r-- 1 abhishek abhishek 12817 Sep 22 12:28 sample.txt\r\n<\/pre>\n\u4e0a\u8ff0\u5217\u8868\u4e2d mylink \u4e3a\u7b26\u53f7\u94fe\u63a5\uff0c\u5927\u5bb6\u53ef\u4ee5\u770b\u5230\u5176\u662f\u4ee5 l \uff08\u8868\u793a\u94fe\u63a5\uff09\u5f00\u5934\uff0c\u540d\u79f0\u663e\u793a\u5b83\u6307\u5411\u7684\u6587\u4ef6\u3002<\/p>\n
\u6211\u4eec\u4f7f\u7528 rm \u5220\u9664\u5b83\uff0c\u5e76\u9a8c\u8bc1\uff1a<\/p>\n
$ rm mylink \r\n$ ls -l\r\ntotal 4708\r\n-rw-rw-r-- 1 abhishek abhishek 4794657 Sep 27 20:36 export.json\r\n-rw-rw-r-- 1 abhishek abhishek 311 Sep 22 12:19 line.txt\r\n-rw-rw-r-- 1 abhishek abhishek 106 Sep 27 20:39 redirects.json\r\n-rw-r--r-- 1 abhishek abhishek 12817 Sep 22 12:28 sample.txt\r\n<\/pre>\n\u5982\u4e0b\u56fe\u6240\u793a\uff0c\u6e90\u6587\u4ef6\u4ecd\u7136\u5b58\u5728\uff1a<\/p>\n
<\/p>\n
\u5220\u9664\u591a\u4e2a\u94fe\u63a5<\/strong><\/div>\n\u53ef\u4ee5\u4f7f\u7528 rm \u547d\u4ee4\u4e00\u6b21\u5220\u9664\u591a\u4e2a\u7b26\u53f7\u94fe\u63a5\uff1a<\/p>\n
rm symlink1 symlink2 symlink3\r\n<\/pre>\n\u4f7f\u7528 unlink \u547d\u4ee4\u5220\u9664\u8f6f\u94fe\u63a5<\/strong><\/div>\n\u5220\u9664\u8f6f\u94fe\u63a5\u7684\u53e6\u4e00\u79cd\u65b9\u6cd5\u662f\u4f7f\u7528 unlink \u547d\u4ee4\u3002\u8fd9\u4e2a\u547d\u4ee4\u4e4d\u542c\u8d77\u6765\u597d\u50cf\u53ea\u7528\u4e8e\u5220\u9664\u94fe\u63a5\uff0c\u4f46\u5176\u5b9e\u5b83\u4e5f\u53ef\u4ee5\u5220\u9664\u6587\u4ef6\u3002\u4f7f\u7528\u65b9\u5f0f\u5982\u4e0b\uff1a<\/p>\n
unlink name_or_path_of_link\r\n<\/pre>\n\u6211\u4eec\u4f7f\u7528\u4e0a\u9762\u7684\u4f8b\u5b50\uff0c\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n
<\/p>\n
unlink \u4e0d\u80fd\u4e00\u6b21\u5220\u9664\u591a\u4e2a\u94fe\u63a5\u3002<\/p>\n
\u5220\u9664\u6307\u5411\u76ee\u5f55\u7684\u8f6f\u94fe\u63a5<\/strong><\/div>\n\u6211\u4eec\u53ef\u4ee5\u521b\u5efa\u6307\u5411\u6587\u4ef6\u7684\u8f6f\u8fde\u63a5\uff0c\u4e5f\u53ef\u4ee5\u521b\u5efa\u6307\u5411\u76ee\u5f55\u7684\u8f6f\u94fe\u63a5\u3002\u5220\u9664\u76ee\u5f55\u9700\u8981\u4f7f\u7528 -r \u9009\u9879\uff0c\u4f46\u662f\u5220\u9664\u6307\u5411\u76ee\u5f55\u7684\u94fe\u63a5\u5374\u4e0d\u9700\u8981\u4f7f\u7528 -r \u9009\u9879\u3002<\/p>\n
\u4f7f\u7528\u65b9\u6cd5\u4e0e\u5220\u9664\u6587\u4ef6\u94fe\u63a5\u7684\u65b9\u6cd5\u76f8\u540c\uff1a<\/p>\n
rm name_or_path_to_link_to_dir\r\n<\/pre>\n\u5220\u9664\u6307\u5411\u76ee\u5f55\u7684\u8f6f\u8fde\u63a5\u7684\u65f6\u5019\uff0c\u5728\u76ee\u5f55\u7684\u672b\u5c3e\u4e0d\u8981\u6dfb\u52a0\u659c\u6760\uff0c\u5426\u5219\u4f1a\u62a5\u9519\uff1a<\/p>\n
$ rm link_to_dir\/\r\nrm: cannot remove 'link_to_dir\/': Is a directory\r\n<\/pre>\n\u4e0b\u56fe\u662f\u4e00\u4e2a\u5220\u9664\u76ee\u5f55\u8f6f\u94fe\u63a5\u7684\u793a\u4f8b\uff1a<\/p>\n
<\/p>\n
\u6ce8\u610f\uff0c\u5c3d\u91cf\u4e0d\u8981\u4f7f\u7528 -f \u9009\u9879\u5f3a\u5236\u5220\u9664\u6307\u5411\u76ee\u5f55\u7684\u94fe\u63a5\uff0c\u56e0\u4e3a\u5b83\u4f1a\u5220\u9664\u76ee\u5f55\u7684\u5185\u5bb9\u3002\u5982\u4e0b\u56fe\u6240\u793a\uff1a<\/p>\n
<\/p>\n
\u5220\u9664\u786c\u94fe\u63a5<\/strong><\/div>\n\u4e0e\u8f6f\u94fe\u63a5\u4e0d\u540c\uff0c\u786c\u94fe\u63a5\u4e0e\u539f\u59cb\u6587\u4ef6\u51e0\u4e4e\u65e0\u6cd5\u533a\u5206\uff0c\u4f60\u53ea\u80fd\u901a\u8fc7 inode number \u6ce8\u610f\u5230\u5b83\u3002<\/p>\n
\u770b\u4e0b\u9762\u7684\u4f8b\u5b50\uff1a<\/p>\n
$ ls -li\r\ntotal 4716\r\n 544057 -rw-rw-r-- 1 abhishek abhishek 4794657 Sep 27 20:36 export.json\r\n 544884 -rw-rw-r-- 2 abhishek abhishek 311 Sep 22 12:19 hard_link\r\n 544884 -rw-rw-r-- 2 abhishek abhishek 311 Sep 22 12:19 line.txt\r\n1181365 drwxrwxr-x 2 abhishek abhishek 4096 Oct 17 12:33 my_dir\r\n 546419 -rw-rw-r-- 1 abhishek abhishek 106 Sep 27 20:39 redirects.json\r\n<\/pre>\n\u5220\u9664\u786c\u94fe\u63a5\u4e0e\u5220\u9664\u6587\u4ef6\u76f8\u540c\uff1a<\/p>\n
rm path_or_name_of_hard_link\r\n<\/pre>\n\u5220\u9664\u94fe\u63a5\u6587\u4ef6\u4f1a\u600e\u6837\u5462\uff1f<\/strong><\/div>\n\u5b9e\u9645\u4e0a\uff0c\u51e0\u4e4e\u6ca1\u6709\u5728\u5220\u9664\u8f6f\u94fe\u63a5\u7684\u540c\u65f6\uff0c\u4e5f\u8981\u5220\u9664\u539f\u59cb\u6587\u4ef6\u7684\u573a\u666f\u548c\u9700\u6c42\u3002\u5f53\u7136\uff0c\u5982\u679c\u6709\u7684\u8bdd\uff0c\u4f60\u53ef\u4ee5\u901a\u8fc7\u7b26\u53f7\u94fe\u63a5\u627e\u5230\u539f\u59cb\u6587\u4ef6\uff0c\u7136\u540e\u5220\u9664\u5b83\u3002<\/p>\n
rm \"$(readlink '\/path\/to\/link')\" \/path\/to\/link\r\n<\/pre>\n\u6ce8\u610f\uff0c\u5982\u679c\u5220\u9664\u6e90\u6587\u4ef6\uff0c\u4f46\u662f\u6ca1\u6709\u5220\u9664\u8f6f\u94fe\u63a5\uff0c\u90a3\u4e48\u8fd9\u4e2a\u94fe\u63a5\u5c06\u4f1a\u6210\u4e3a\u65ad\u5f00\u7684\u6216\u60ac\u7a7a\u7684\u94fe\u63a5\u3002<\/p>\n
\u867d\u7136\u5b58\u5728 unlink \u547d\u4ee4\uff0c\u4f46\u662f\u6211\u5efa\u8bae\u4f7f\u7528 rm \u547d\u4ee4\u6765\u5220\u9664\u7b26\u53f7\u94fe\u63a5\u3002\u56e0\u4e3a\u8fd9\u4e2a\u662f\u6211\u4eec\u90fd\u6bd4\u8f83\u719f\u6089\u7684\u547d\u4ee4\uff0c\u7ecf\u5e38\u4f7f\u7528\u5b83\u6765\u5220\u9664\u6587\u4ef6\uff0c\u5f53\u7136\u4e5f\u53ef\u4ee5\u7528\u6765\u5220\u9664\u7b26\u53f7\u94fe\u63a5\u3002<\/p>\n
\u4ee5\u4e0a\u5c31\u662f\u672c\u6b21\u5206\u4eab\u5168\u90e8\u5185\u5bb9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528 ln \u547d\u4ee4\u6765\u521b\u5efa\u8f6f\u8fde\u63a5\uff0c\u90a3\u4e48\u600e\u6837\u5220\u9664\u5462\uff1f Linux \u4e2d\u6ca1\u6709\u7528\u4e8e\u5220\u9664\u7b26\u53f7\u94fe\u63a5\u7684\u7279\u6b8a\u547d\u4ee4\uff0c\u4e0d\u8fc7\u53ef\u4ee5 […]<\/p>\n","protected":false},"author":1469,"featured_media":255635,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-255628","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/255628","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\/1469"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=255628"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/255628\/revisions"}],"predecessor-version":[{"id":255636,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/255628\/revisions\/255636"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/255635"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=255628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=255628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=255628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}