[{"data":1,"prerenderedAt":175},["ShallowReactive",2],{"content-query-tOzJERtwsZ":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"category":5,"createdAt":10,"updatedAt":10,"body":11,"_type":169,"_id":170,"_source":171,"_file":172,"_stem":173,"_extension":174},"/article/server/linux-handle-compressed-archive","server",false,"","Linux 處理壓縮檔案","在 Linux 中常需要處理壓縮檔案，相關的指令如下:","2024-07-28",{"type":12,"children":13,"toc":164},"root",[14,21,28,72,83,94,100,125,136,147,158],{"type":15,"tag":16,"props":17,"children":18},"element","p",{},[19],{"type":20,"value":9},"text",{"type":15,"tag":22,"props":23,"children":25},"h2",{"id":24},"使用-curl-下載-targz-檔案以-github-release-為例",[26],{"type":20,"value":27},"使用 curl 下載 tar.gz 檔案(以 Github release 為例)",{"type":15,"tag":29,"props":30,"children":34},"pre",{"className":31,"code":32,"language":33,"meta":7,"style":7},"language-sh shiki shiki-themes material-theme-palenight","curl -L -o release.tar.gz https://github.com/laravel/laravel/archive/refs/tags/v11.1.4.tar.gz\n","sh",[35],{"type":15,"tag":36,"props":37,"children":38},"code",{"__ignoreMap":7},[39],{"type":15,"tag":40,"props":41,"children":44},"span",{"class":42,"line":43},"line",1,[45,51,57,62,67],{"type":15,"tag":40,"props":46,"children":48},{"style":47},"--shiki-default:#FFCB6B",[49],{"type":20,"value":50},"curl",{"type":15,"tag":40,"props":52,"children":54},{"style":53},"--shiki-default:#C3E88D",[55],{"type":20,"value":56}," -L",{"type":15,"tag":40,"props":58,"children":59},{"style":53},[60],{"type":20,"value":61}," -o",{"type":15,"tag":40,"props":63,"children":64},{"style":53},[65],{"type":20,"value":66}," release.tar.gz",{"type":15,"tag":40,"props":68,"children":69},{"style":53},[70],{"type":20,"value":71}," https://github.com/laravel/laravel/archive/refs/tags/v11.1.4.tar.gz\n",{"type":15,"tag":16,"props":73,"children":74},{},[75,81],{"type":15,"tag":36,"props":76,"children":78},{"className":77},[],[79],{"type":20,"value":80},"-L",{"type":20,"value":82},": 自動跟隨重定向。",{"type":15,"tag":16,"props":84,"children":85},{},[86,92],{"type":15,"tag":36,"props":87,"children":89},{"className":88},[],[90],{"type":20,"value":91},"-o release.tar.gz",{"type":20,"value":93},": 將下載的檔案儲存為 release.tar.gz。",{"type":15,"tag":22,"props":95,"children":97},{"id":96},"使用-tar-解壓縮-targz-檔案",[98],{"type":20,"value":99},"使用 tar 解壓縮 tar.gz 檔案",{"type":15,"tag":29,"props":101,"children":103},{"className":31,"code":102,"language":33,"meta":7,"style":7},"tar -xzf release.tar.gz\n",[104],{"type":15,"tag":36,"props":105,"children":106},{"__ignoreMap":7},[107],{"type":15,"tag":40,"props":108,"children":109},{"class":42,"line":43},[110,115,120],{"type":15,"tag":40,"props":111,"children":112},{"style":47},[113],{"type":20,"value":114},"tar",{"type":15,"tag":40,"props":116,"children":117},{"style":53},[118],{"type":20,"value":119}," -xzf",{"type":15,"tag":40,"props":121,"children":122},{"style":53},[123],{"type":20,"value":124}," release.tar.gz\n",{"type":15,"tag":16,"props":126,"children":127},{},[128,134],{"type":15,"tag":36,"props":129,"children":131},{"className":130},[],[132],{"type":20,"value":133},"-x",{"type":20,"value":135},": extract，表示 tar 要提取檔案。",{"type":15,"tag":16,"props":137,"children":138},{},[139,145],{"type":15,"tag":36,"props":140,"children":142},{"className":141},[],[143],{"type":20,"value":144},"-z",{"type":20,"value":146},": gzip，表示 tar 處理的是 gzip 壓縮檔案。",{"type":15,"tag":16,"props":148,"children":149},{},[150,156],{"type":15,"tag":36,"props":151,"children":153},{"className":152},[],[154],{"type":20,"value":155},"-f",{"type":20,"value":157}," release.tar.gz: file，指定要操作的檔名是 release.tar.gz。",{"type":15,"tag":159,"props":160,"children":161},"style",{},[162],{"type":20,"value":163},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":165,"depth":165,"links":166},2,[167,168],{"id":24,"depth":165,"text":27},{"id":96,"depth":165,"text":99},"markdown","content:article:server:linux-handle-compressed-archive.md","content","article/server/linux-handle-compressed-archive.md","article/server/linux-handle-compressed-archive","md",1766375573978]