{"id":3300,"date":"2019-06-28T11:21:53","date_gmt":"2019-06-28T03:21:53","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3300"},"modified":"2019-06-28T11:21:54","modified_gmt":"2019-06-28T03:21:54","slug":"cpio","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/cpio","title":{"rendered":"cpio\u547d\u4ee4 – \u590d\u5236\u6587\u4ef6\u5230\u5f52\u6863\u5305"},"content":{"rendered":"\n
cpio\u547d\u4ee4\u4e3b\u8981\u662f\u7528\u6765\u5efa\u7acb\u6216\u8005\u8fd8\u539f\u5907\u4efd\u6863\u7684\u5de5\u5177\u7a0b\u5e8f\uff0ccpio\u547d\u4ee4\u53ef\u4ee5\u590d\u5236\u6587\u4ef6\u5230\u5f52\u6863\u5305\u4e2d\uff0c\u6216\u8005\u4ece\u5f52\u6863\u5305\u4e2d\u590d\u5236\u6587\u4ef6\u3002<\/p>\n\n\n\n
\u8bed\u6cd5\u683c\u5f0f: <\/strong>cpio [\u53c2\u6570]<\/p>\n\n\n\n \u5e38\u7528\u53c2\u6570\uff1a\ufeff<\/strong><\/p>\n\n\n\n \u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n \u5c06\/etc\u4e0b\u7684\u6240\u6709\u666e\u901a\u6587\u4ef6\u90fd\u5907\u4efd\u5230\/opt\/etc.cpio\uff1a <\/p>\n\n\n\n \u5c06\u7cfb\u7edf\u4e0a\u6240\u6709\u8d44\u6599\u5907\u4efd\u5230\u78c1\u5e26\u673a\u5185\uff1a <\/p>\n\n\n\n \u5c06\u7cfb\u7edf\u4e0a\u6240\u6709\u8d44\u6599\u5907\u4efd\u5230\u78c1\u5e26\u673a\u5185\uff1a <\/p>\n\n\n\n cpio\u547d\u4ee4\u4e3b\u8981\u662f\u7528\u6765\u5efa\u7acb\u6216\u8005\u8fd8\u539f\u5907\u4efd\u6863\u7684\u5de5\u5177\u7a0b\u5e8f\uff0ccpio\u547d\u4ee4\u53ef\u4ee5\u590d\u5236\u6587\u4ef6\u5230\u5f52\u6863\u5305\u4e2d\uff0c\u6216\u8005\u4ece\u5f52\u6863\u5305\u4e2d\u590d\u5236\u6587\u4ef6 […]<\/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\/3300"}],"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=3300"}],"version-history":[{"count":5,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3300\/revisions"}],"predecessor-version":[{"id":3633,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3300\/revisions\/3633"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3300"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}-0<\/td> \u63a5\u53d7\u65b0\u589e\u5217\u63a7\u5236\u5b57\u7b26\uff0c\u901a\u5e38\u914d\u5408find\u6307\u4ee4\u7684\u201c-print0\u201d\u53c2\u6570\u4f7f\u7528 <\/td><\/tr> -a<\/td> \u91cd\u65b0\u8bbe\u7f6e\u6587\u4ef6\u7684\u5b58\u53d6\u65f6\u95f4 <\/td><\/tr> -A <\/td> \u9644\u52a0\u5230\u5df2\u5b58\u5728\u7684\u5907\u4efd\u6587\u6863\u4e2d\uff0c\u4e14\u8fd9\u4e2a\u5907\u4efd\u6587\u6863\u5fc5\u987b\u5b58\u653e\u5728\u78c1\u76d8\u4e0a\uff0c\u800c\u4e0d\u80fd\u653e\u7f6e\u4e8e\u78c1\u5e26\u673a\u91cc <\/td><\/tr> -B<\/td> \u5c06\u8f93\u5165\/\u8f93\u51fa\u7684\u533a\u5757\u5927\u5c0f\u6539\u62105210Bytes <\/td><\/tr> -c<\/td> \u4f7f\u7528\u65e7ASCII\u5907\u4efd\u683c\u5f0f <\/td><\/tr><\/tbody><\/table>\n\n\n\n [root@linuxcool ~]# find \/etc \u2013type f | cpio \u2013ocvB >\/opt\/etc.cpio<\/pre>\n\n\n\n
[root@linuxcool ~]# find \/ -print | cpio -covB > \/dev\/st0<\/pre>\n\n\n\n
[root@linuxcool ~]# cpio -icdvt < \/dev\/st0 > \/tmp\/st_content <\/pre>\n","protected":false},"excerpt":{"rendered":"