{"id":154,"date":"2019-03-11T21:38:34","date_gmt":"2019-03-11T13:38:34","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=154"},"modified":"2022-05-01T01:49:00","modified_gmt":"2022-04-30T17:49:00","slug":"cp","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/cp","title":{"rendered":"cp\u547d\u4ee4 – \u590d\u5236\u6587\u4ef6\u6216\u76ee\u5f55"},"content":{"rendered":"\n

cp\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdcopy\u7684\u7f29\u5199\uff0c\u7528\u4e8e\u5c06\u4e00\u4e2a\u6216\u591a\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\u590d\u5236\u5230\u6307\u5b9a\u4f4d\u7f6e\uff0c\u4ea6\u5e38\u7528\u4e8e\u6587\u4ef6\u7684\u5907\u4efd\u5de5\u4f5c\u3002-r\u53c2\u6570\u7528\u4e8e\u9012\u5f52\u64cd\u4f5c\uff0c\u590d\u5236\u76ee\u5f55\u65f6\u82e5\u5fd8\u8bb0\u52a0\u5219\u4f1a\u76f4\u63a5\u62a5\u9519\uff0c\u800c-f\u53c2\u6570\u5219\u7528\u4e8e\u5f53\u76ee\u6807\u6587\u4ef6\u5df2\u5b58\u5728\u65f6\u4f1a\u76f4\u63a5\u8986\u76d6\u4e0d\u518d\u8be2\u95ee\uff0c\u8fd9\u4e24\u4e2a\u53c2\u6570\u5c24\u4e3a\u5e38\u7528\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>cp [\u53c2\u6570] \u6e90\u6587\u4ef6 \u76ee\u6807\u6587\u4ef6 <\/p>\n\n\n\n

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

-f<\/td>\u82e5\u76ee\u6807\u6587\u4ef6\u5df2\u5b58\u5728\uff0c\u5219\u4f1a\u76f4\u63a5\u8986\u76d6\u539f\u6587\u4ef6<\/td><\/tr>
-i<\/td>\u82e5\u76ee\u6807\u6587\u4ef6\u5df2\u5b58\u5728\uff0c\u5219\u4f1a\u8be2\u95ee\u662f\u5426\u8986\u76d6<\/td><\/tr>
-p<\/td>\u4fdd\u7559\u6e90\u6587\u4ef6\u6216\u76ee\u5f55\u7684\u6240\u6709\u5c5e\u6027<\/td><\/tr>
-r<\/td>\u9012\u5f52\u590d\u5236\u6587\u4ef6\u548c\u76ee\u5f55<\/td><\/tr>
-d<\/td>\u5f53\u590d\u5236\u7b26\u53f7\u8fde\u63a5\u65f6\uff0c\u628a\u76ee\u6807\u6587\u4ef6\u6216\u76ee\u5f55\u4e5f\u5efa\u7acb\u4e3a\u7b26\u53f7\u8fde\u63a5\uff0c\u5e76\u6307\u5411\u4e0e\u6e90\u6587\u4ef6\u6216\u76ee\u5f55\u8fde\u63a5\u7684\u539f\u59cb\u6587\u4ef6\u6216\u76ee\u5f55<\/td><\/tr>
-l<\/td>\u5bf9\u6e90\u6587\u4ef6\u5efa\u7acb\u786c\u8fde\u63a5\uff0c\u800c\u975e\u590d\u5236\u6587\u4ef6 <\/td><\/tr>
-s<\/td>\u5bf9\u6e90\u6587\u4ef6\u5efa\u7acb\u7b26\u53f7\u8fde\u63a5\uff0c\u800c\u975e\u590d\u5236\u6587\u4ef6 <\/td><\/tr>
-b<\/td>\u8986\u76d6\u5df2\u5b58\u5728\u7684\u6587\u4ef6\u76ee\u6807\u524d\u5c06\u76ee\u6807\u6587\u4ef6\u5907\u4efd <\/td><\/tr>
-v<\/td>\u8be6\u7ec6\u663e\u793acp\u547d\u4ee4\u6267\u884c\u7684\u64cd\u4f5c\u8fc7\u7a0b<\/td><\/tr>
-a<\/td>\u7b49\u4ef7\u4e8e\u201cpdr\u201d\u9009\u9879<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e2d\uff0c\u5c06\u67d0\u4e2a\u6587\u4ef6\u590d\u5236\u4e00\u4efd\uff0c\u5e76\u5b9a\u4e49\u65b0\u6587\u4ef6\u540d\u79f0\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cp anaconda-ks.cfg kickstart.cfg<\/strong><\/pre>\n\n\n\n

\u5728\u5f53\u524d\u5de5\u4f5c\u76ee\u5f55\u4e2d\uff0c\u5c06\u67d0\u4e2a\u76ee\u5f55\u590d\u5236\u4e00\u4efd\uff0c\u5e76\u5b9a\u4e49\u65b0\u76ee\u5f55\u540d\u79f0\uff1a <\/p>\n\n\n\n

[root@linuxcool ~]# cp -r Documents Doc<\/strong>\r<\/pre>\n\n\n\n

\u590d\u5236\u67d0\u4e2a\u6587\u4ef6\u65f6\uff0c\u4fdd\u7559\u5176\u539f\u59cb\u6743\u9650\u53ca\u7528\u6237\u5f52\u5c5e\u4fe1\u606f\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cp -a kickstart.cfg ks.cfg<\/strong><\/pre>\n\n\n\n

\u5c06\u67d0\u4e2a\u6587\u4ef6\u590d\u5236\u5230\/etc\u76ee\u5f55\u4e2d\uff0c\u5e76\u8986\u76d6\u5df2\u6709\u6587\u4ef6\uff0c\u4e0d\u8fdb\u884c\u8be2\u95ee\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cp -f ks.cfg \/etc<\/strong><\/pre>\n\n\n\n

\u5c06\u591a\u4e2a\u6587\u4ef6\u4e00\u540c\u590d\u5236\u5230\/etc\u76ee\u5f55\u4e2d\uff0c\u5982\u5df2\u6709\u76ee\u6807\u6587\u4ef6\u540d\u79f0\u5219\u9ed8\u8ba4\u8be2\u95ee\u662f\u5426\u8986\u76d6\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# cp anaconda-ks.cfg ks.cfg \/etc<\/strong>\r\ncp: overwrite '\/etc\/ks.cfg'? y<\/strong>\r<\/pre>\n","protected":false},"excerpt":{"rendered":"

cp\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u5355\u8bcdcopy\u7684\u7f29\u5199\uff0c\u7528\u4e8e\u5c06\u4e00\u4e2a\u6216\u591a\u4e2a\u6587\u4ef6\u6216\u76ee\u5f55\u590d\u5236\u5230\u6307\u5b9a\u4f4d\u7f6e\uff0c\u4ea6\u5e38\u7528\u4e8e\u6587\u4ef6\u7684\u5907\u4efd\u5de5\u4f5c\u3002-r\u53c2 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/154"}],"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=154"}],"version-history":[{"count":13,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/154\/revisions"}],"predecessor-version":[{"id":9028,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/154\/revisions\/9028"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}