{"id":4112,"date":"2019-07-27T22:20:43","date_gmt":"2019-07-27T14:20:43","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=4112"},"modified":"2022-05-02T20:20:39","modified_gmt":"2022-05-02T12:20:39","slug":"rm","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/rm","title":{"rendered":"rm\u547d\u4ee4 – \u5220\u9664\u6587\u4ef6\u6216\u76ee\u5f55"},"content":{"rendered":"\n

rm\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdremove\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5220\u9664\u6587\u4ef6\u6216\u76ee\u5f55\uff0c\u4e00\u6b21\u53ef\u4ee5\u5220\u9664\u591a\u4e2a\u6587\u4ef6\uff0c\u6216\u9012\u5f52\u5220\u9664\u76ee\u5f55\u53ca\u5176\u5185\u7684\u6240\u6709\u5b50\u6587\u4ef6\u3002<\/p>\n\n\n\n

rm\u4e5f\u662f\u4e00\u4e2a\u5f88\u5371\u9669\u7684\u547d\u4ee4\uff0c\u4f7f\u7528\u7684\u65f6\u5019\u8981\u7279\u522b\u5f53\u5fc3\uff0c\u5c24\u5176\u5bf9\u4e8e\u65b0\u624b\u66f4\u8981\u683c\u5916\u6ce8\u610f\uff0c\u5982\u6267\u884crm -rf \/*\u547d\u4ee4\u5219\u4f1a\u6e05\u7a7a\u7cfb\u7edf\u4e2d\u6240\u6709\u7684\u6587\u4ef6\uff0c\u751a\u81f3\u65e0\u6cd5\u6062\u590d\u56de\u6765\u3002\u6240\u4ee5\u6211\u4eec\u5728\u6267\u884c\u4e4b\u524d\u4e00\u5b9a\u8981\u518d\u6b21\u786e\u8ba4\u4e0b\u5728\u54ea\u4e2a\u76ee\u5f55\u4e2d\uff0c\u5230\u5e95\u8981\u5220\u9664\u4ec0\u4e48\u6587\u4ef6\uff0c\u8003\u8651\u597d\u540e\u518d\u6572\u51fb\u56de\u8f66\uff0c\u65f6\u523b\u4fdd\u6301\u6e05\u9192\u7684\u5934\u8111\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>rm [\u53c2\u6570] \u6587\u4ef6<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-f<\/td>\u5f3a\u5236\u5220\u9664\uff08\u4e0d\u4e8c\u6b21\u8be2\u95ee\uff09<\/td><\/tr>
-i <\/td>\u5220\u9664\u524d\u4f1a\u8be2\u95ee\u7528\u6237\u662f\u5426\u64cd\u4f5c<\/td><\/tr>
-r\/R <\/td>\u9012\u5f52\u5220\u9664<\/td><\/tr>
-v<\/td>\u663e\u793a\u6307\u4ee4\u7684\u8be6\u7ec6\u6267\u884c\u8fc7\u7a0b<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u5220\u9664\u67d0\u4e2a\u6587\u4ef6\uff0c\u9ed8\u8ba4\u4f1a\u8fdb\u884c\u4e8c\u6b21\u786e\u8ba4\uff0c\u6572\u51fby\u8fdb\u884c\u786e\u8ba4\u3002<\/p>\n\n\n\n

[root@linuxcool ~]# rm anaconda-ks.cfg <\/strong>\r\nrm: remove regular file 'anaconda-ks.cfg'? y<\/strong>\r<\/pre>\n\n\n\n

\u5220\u9664\u67d0\u4e2a\u6587\u4ef6\uff0c\u5f3a\u5236\u64cd\u4f5c\u4e0d\u9700\u8981\u4e8c\u6b21\u786e\u8ba4\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# rm -f initial-setup-ks.cfg <\/strong><\/pre>\n\n\n\n

\u5220\u9664\u67d0\u4e2a\u76ee\u5f55\u53ca\u5176\u5185\u7684\u5b50\u6587\u4ef6\u6216\u5b50\u76ee\u5f55\uff0c\u4e00\u5e76\u90fd\u5f3a\u5236\u5220\u9664\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# rm -rf Documents<\/strong><\/pre>\n\n\n\n

\u5f3a\u5236\u5220\u9664\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u5185\u7684\u6240\u6709\u4ee5.txt\u4e3a\u540e\u7f00\u7684\u6587\u4ef6<\/p>\n\n\n\n

[root@linuxcool ~]# rm -f *.txt<\/strong><\/pre>\n\n\n\n

\u3010\u79bb\u804c\u5c0f\u5999\u62db\uff0c\u8c28\u614e\uff01\uff01\uff01\u3011\u5f3a\u5236\u6e05\u7a7a\u670d\u52a1\u5668\u7cfb\u7edf\u5185\u7684\u6240\u6709\u6587\u4ef6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# rm -rf \/*<\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"

rm\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdremove\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u5220\u9664\u6587\u4ef6\u6216\u76ee\u5f55\uff0c\u4e00\u6b21\u53ef\u4ee5\u5220\u9664\u591a\u4e2a\u6587\u4ef6\uff0c\u6216\u9012\u5f52\u5220\u9664\u76ee\u5f55\u53ca\u5176 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[3],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4112"}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=4112"}],"version-history":[{"count":14,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4112\/revisions"}],"predecessor-version":[{"id":9105,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/4112\/revisions\/9105"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=4112"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=4112"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=4112"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}