{"id":10801,"date":"2023-01-31T22:21:02","date_gmt":"2023-01-31T14:21:02","guid":{"rendered":"https:\/\/www.linuxcool.com\/djy"},"modified":"2023-01-31T22:21:02","modified_gmt":"2023-01-31T14:21:02","slug":"djy","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/djy","title":{"rendered":"data+%F##39;\u89e3\u538b"},"content":{"rendered":"<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>1.tar.gz tar.bz2 tar.xf<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>2.gzip<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>3.zip<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>4.zcat<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>data +%F #\u6253\u5305\u540d\u79f0\u5305\u542b\u5f53\u524d\u65f6\u95f4<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5e38\u7528<a style='color:#0000CC' href='https:\/\/www.linuxcool.com\/' target='_blank' rel=\"noopener\">\u547d\u4ee4<\/a>\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>1.tar\u6253\u5305\u538b\u7f29<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u6253\u5305\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar czf dir1.tar.gz dir1<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u89e3\u538b\uff1a####### tar\u89e3\u538b\u4f1a\u8986\u76d6\u6389\u4e4b\u524d\u5b58\u5728\u7684\u76ee\u5f55qq for linux\uff0c\u89e3\u538b\u524d\u5148\u628a\u539f\u76ee\u5f55\u91cd\u547d\u540d\u5907\u4efd ############<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar xf dir1.tar.gz #\u53ef\u89e3\u538btar.gz tar.bz2 tar.xz<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u67e5\u770b\u538b\u7f29\u5305\u91cc\u7684\u5185\u5bb9<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar tf dir1.tar.gz<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>1\u3001tar\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u6253\u5305\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar -czf dir20190101.tar dir<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u89e3\u538b\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar xf dir20190101.tar<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u67e5\u770b\u5305\u91cc\u7684\u5185\u5bb9<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar tf dirdir20190101.tar<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar.gz\u683c\u5f0f<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar\u547d\u4ee4\u8fdb\u884c\u5f52\u6863\uff0cgzip\u8fdb\u884c\u538b\u7f29\uff0c\u53d8\u6210tar.gz<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5982\u4f55\u6253\u5305<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar czf dir1.tar.gz dir1<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5e38\u7528\u6253\u5305\u4e0e\u538b\u7f29\u7ec4\u5408\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>czf #\u6253\u5305tar.gz\u683c\u5f0f \u89e3\u538b\uff1azxf<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>cjf #\u6253\u5305tar.bz\u683c\u5f0f \u89e3\u538b\uff1ajxf<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>cJf #\u6253\u5305tar.xz\u683c\u5f0f \u89e3\u538b\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>xf\uff1a\u81ea\u52a8\u9009\u62e9\u89e3\u538b\u6a21\u5f0f(\u4e00\u822c\u4f7f\u7528\u8fd9\u4e2a\u89e3\u538b\u5373\u53ef)<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5982\u4f55\u89e3\u538b<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>tar xf dir1.tar.gz<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u9009\u9879\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>c\uff1a\u521b\u89c1\u65b0\u7684\u5f52\u6863\u6587\u4ef6<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>z\uff1a\u4ee5gzip\u65b9\u5f0f\u538b\u7f29\uff0c\u540e\u7f00tar.gz<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>x\uff1a\u5bf9\u5f52\u6863\u6587\u4ef6\u89e3\u5305<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>t\uff1a\u5217\u51fa\u5f52\u6863\u6587\u4ef6\u91cc\u7684\u6587\u4ef6\u5217\u8868<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>f\uff1a\u6307\u5b9a\u5305\u540d\uff0c\u591a\u53c2\u6570f\u5199\u6700\u540e<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>j\uff1a\u4f7f\u7528bzip2\u538b\u7f29\u5f52\u6863<strong>linux\u89e3\u538btar\u6587\u4ef6\u547d\u4ee4<\/strong>\uff0c\u540e\u7f00tar.bz<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>J\uff1a\u5927\u5199\u7684J\uff0cxz\u538b\u7f29\u5f52\u6863\u4e2d\u6807linux\uff0c\u540e\u7f00tar.xz<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>C\uff1a\u5927C\uff0c\u6307\u5b9a\u89e3\u538b\u76ee\u5f55\u4f4d\u7f6e<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>X\uff1a\u6392\u9664\u591a\u4e2a\u6587\u4ef6(\u5199\u5165\u9700\u8981\u6392\u9664\u7684\u6587\u4ef6\u540d\u79f0)<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>h\uff1a\u6253\u5305\u8f6f\u94fe\u63a5<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>--exclude\uff1a\u6392\u9664\u4e0d\u9700\u8981\u6253\u5305\u7684\u6587\u4ef6<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>--exclude \/etc\/passwd \/etc\/shadow<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>2\u3001gzip #\u538b\u7f29\u5355\u4e2a\u6587\u4ef6\u7684\u65f6\u5019\u4f7f\u7528<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u538b\u7f29\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'><img style='max-height:500px;max-width:80%;margin: 10px auto' src='https:\/\/www.linuxcool.com\/wp-content\/uploads\/2023\/01\/1675174862998_0.jpg' alt='linux\u4e2dtar\u547d\u4ee4\u89e3\u538b_linux \u89e3\u538btar\u5305\u547d\u4ee4_linux\u89e3\u538btar\u6587\u4ef6\u547d\u4ee4' \/><\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>gzip file #\u538b\u7f29file\u6587\u4ef6<strong>linux\u89e3\u538btar\u6587\u4ef6\u547d\u4ee4<\/strong>\uff0c\u538b\u7f29\u5b8c\u6bd5\u4f1a\u5220\u9664\u539f\u6587\u4ef6<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u89e3\u538b\u7f29\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>gzip -d file #\u89e3\u538b\u7f29\uff0c\u4f1a\u628a\u539f\u538b\u7f29\u5305\u5220\u9664<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u4f7f\u7528\u573a\u666f\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>1.\u5f53\u9700\u8981\u8ba9\u67d0\u4e2a\u914d\u7f6e\u6587\u4ef6\u4e0d\u751f\u6548\u65f6<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>gzip CentOS-Base.repo<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u60f3\u8981\u67e5\u770b\u91cc\u9762\u7684\u5185\u5bb9\u7528zacat<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>zcat CentOS-Base.repo<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>2.\u628a\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u90fd\u6253\u5305<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>gzip * #\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u5355\u72ec\u6253\u6210\u4e00\u4e2a\u5305<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>3\u3001zip\uff0c\u538b\u7f29\u6587\u4ef6\u3001\u76ee\u5f55(\u5e76\u4e0d\u4f1a\u5220\u9664\u6e90\u6587\u4ef6)<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5b89\u88c5zip<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>yum install zip unzip -y<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u53c2\u6570\uff1a<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>-r\uff1a\u9012\u5f52\u6253\u5305\u76ee\u5f55\u4e0b\u6240\u6709\u5185\u5bb9<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5982\u4f55\u538b\u7f29\u6587\u4ef6<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>zip \u538b\u7f29\u5305\u540d \u8981\u6253\u5305\u7684\u6587\u4ef6<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>zip file.zip file.log<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5982\u4f55\u538b\u7f29\u76ee\u5f55<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>zip -r dir.zip \/dir<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u5982\u4f55\u89e3\u538b<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>unzip \u5305\u540d.zip<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>\u6d4b\u8bd5\u662f\u5426\u80fd\u4e0ewindows\u4e4b\u95f4\u76f8\u4e92\u89e3\u538b<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>4.zcat #\u67e5\u770b\u538b\u7f29\u5305\u91cc\u6587\u4ef6\u7684\u5185\u5bb9<\/p>\n<p style='margin-bottom:16px;color:#555555;font-size:16px;line-height:200%;text-indent:2em'>zcat file.gz #\u67e5\u770bgz\u538b\u7f29\u540e\u7684\u5185\u5bb9<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#\u53ef\u89e3\u538btar.tar\u547d\u4ee4\u8fdb\u884c\u5f52\u6863\uff0cgzip\u8fdb\u884c\u538b\u7f29\uff0c\u53d8\u6210tar.z\uff1a\u4ee5gzip\u65b9\u5f0f\u538b\u7f29\uff0c\u540e\u7f00tar.t\uff1a\u5217\u51fa\u5f52\u6863\u6587\u4ef6\u91cc\u7684\u6587\u4ef6\u5217\u8868j\uff1a\u4f7f\u7528bzip2\u538b\u7f29\u5f52\u6863\uff0c\u540e\u7f00tar.J\uff1a\u5927\u5199\u7684J\uff0cxz\u538b\u7f29\u5f52\u6863\uff0c\u540e\u7f00tar.#\u538b\u7f29file\u6587\u4ef6\uff0c\u538b\u7f29\u5b8c\u6bd5\u4f1a\u5220\u9664\u539f\u6587\u4ef6#\u89e3\u538b\u7f29\uff0c\u4f1a\u628a\u539f\u538b\u7f29\u5305\u5220\u9664\u628a\u5f53\u524d\u76ee\u5f55\u4e0b\u6240\u6709\u6587\u4ef6\u90fd\u6253\u53053\u3001zip\uff0c\u538b\u7f29\u6587\u4ef6\u3001\u76ee\u5f55(\u5e76\u4e0d\u4f1a\u5220\u9664\u6e90\u6587\u4ef6)#\u67e5\u770b\u538b\u7f29\u5305\u91cc\u6587\u4ef6\u7684\u5185\u5bb9<\/p>\n","protected":false},"author":1,"featured_media":10802,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[139,103,111,112],"class_list":["post-10801","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledge","tag-g-3","tag-g","tag-t","tag-tdb"],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/10801","targetHints":{"allow":["GET"]}}],"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=10801"}],"version-history":[{"count":0,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/10801\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media\/10802"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=10801"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=10801"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=10801"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}