{"id":94335,"date":"2022-01-27T08:55:33","date_gmt":"2022-01-26T23:55:33","guid":{"rendered":"https:\/\/softantenna.com\/blog\/?p=94335"},"modified":"2022-01-27T08:55:33","modified_gmt":"2022-01-26T23:55:33","slug":"how-to-manage-7-zip-archive-on-macos","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/how-to-manage-7-zip-archive-on-macos\/","title":{"rendered":"Mac\u30677-Zip\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u64cd\u4f5c\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p><img decoding=\"async\" style=\"display:block; margin-left:auto; margin-right:auto;\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2022\/01\/s_20220120_205010.jpg\" alt=\"S 20220120 205010\" title=\"s_20220120_205010.jpg\" border=\"0\" width=\"860\" height=\"560\" \/><\/p>\n<p>\u4e3b\u306bWindows\u3067\u4eba\u6c17\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30d5\u30a1\u30a4\u30eb\u30a2\u30fc\u30ab\u30a4\u30d0\u300c7-Zip\u300d\u3002<\/p>\n<p>macOS\u3084Linux\u3067\u306f\u3042\u307e\u308a\u30e1\u30b8\u30e3\u30fc\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u5727\u7e2e\u7387\u306e\u9ad8\u3055\u304b\u3089\u3053\u308c\u3089\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u30827-Zip\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u6271\u3044\u305f\u3044\u3068\u3044\u3046\u65b9\u3082\u591a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n<p>\u4eca\u56de\u306fmacOS\u3067\u30017-Zip\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u6271\u3046\u65b9\u6cd5\u3092\u8aac\u660e\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n<h2>\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u304b\u3089\u6271\u3046\u306e\u304c\u7c21\u5358<\/h2>\n<p>7-Zip\u306f\u6700\u8fd1\u3001macOS\u3084<a href=\"https:\/\/softantenna.com\/blog\/7-zip-for-linux-alpha\/\">Linux\u7528\u306e\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30d0\u30fc\u30b8\u30e7\u30f3\u304c\u63d0\u4f9b<\/a>\u3055\u308c\u308b\u3088\u3046\u306b\u306a\u308a\u307e\u3057\u305f\u3002\u3057\u304b\u3057\u4ee5\u524d\u304b\u3089\u4f7f\u308f\u308c\u3066\u304d\u305fp7zip\u3068\u3044\u3046\u30c4\u30fc\u30eb\u3082\u5b58\u5728\u3057(\u3053\u3061\u3089\u306f\u30b5\u30fc\u30c9\u30d1\u30fc\u30c6\u30a3\u958b\u767a\u8005\u306b\u3088\u3063\u3066\u4f5c\u6210\u3055\u308c\u307e\u3057\u305f)\u3001\u5404\u7a2e\u30d1\u30c3\u30b1\u30fc\u30b8\u30de\u30cd\u30fc\u30b8\u30e3\u30fc\u3092\u4f7f\u3063\u3066\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306fp7zip\u3092\u4f7f\u3046\u65b9\u6cd5\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p>macOS\u306e\u5834\u5408\u306f\u3001Homebrew\u3084MacPorts\u3092\u4f7f\u3063\u3066\u7c21\u5358\u306b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>Homebrew\u306e\u5834\u5408:<\/p>\n<pre>\r\nbrew install p7zip\r\n<\/pre>\n<p>MacPorts\u306e\u5834\u5408:<\/p>\n<pre>\r\nsudo port install p7zip\r\n<\/pre>\n<p>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u305f\u300c7z\u300d\u30b3\u30de\u30f3\u30c9\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\n# \u5727\u7e2e\r\n$ 7z a \u30a2\u30fc\u30ab\u30a4\u30d6\u540d.7z \u30d5\u30a1\u30a4\u30eb\u540d(or \u30d5\u30a9\u30eb\u30c0\u540d)\r\n\r\n# \u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u4e00\u89a7\r\n$ 7z l \u30a2\u30fc\u30ab\u30a4\u30d6\u540d.7z\r\n\r\n# \u89e3\u51cd\r\n$ 7z x \u30a2\u30fc\u30ab\u30a4\u30d6\u540d.7z\r\n<\/pre>\n<p>\u4f8b\u3048\u3070tmp2\u30d5\u30a9\u30eb\u30c0\u3092\u5727\u7e2e\u3059\u308b\u5834\u5408\u300ca\u300d\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3044\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u5b9f\u884c\u3057\u307e\u3059\u3002\u5b9f\u884c\u5f8c\u30ab\u30ec\u30f3\u30c8\u30d5\u30a9\u30eb\u30c0\u306btmp2.7z\u304c\u4f5c\u3089\u308c\u307e\u3059\u3002<\/p>\n<pre>\r\n[sora@amber] $ 7z a tmp2.7z tmp2\r\n\r\n7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21\r\np7zip Version 16.02 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,6 CPUs x64)\r\n\r\nScanning the drive:\r\n1 folder, 2 files, 13 bytes (1 KiB)\r\n\r\nCreating archive: tmp2.7z\r\n\r\nItems to compress: 3\r\n\r\n\r\nFiles read from disk: 1\r\nArchive size: 203 bytes (1 KiB)\r\nEverything is Ok\r\n<\/pre>\n<p>\u4e2d\u8eab\u3092\u78ba\u8a8d\u3059\u308b\u5834\u5408\u306f\u300cl\u300d\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\n[sora@amber] $ 7z l tmp2.7z\r\n\r\n7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21\r\np7zip Version 16.02 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,6 CPUs x64)\r\n\r\nScanning the drive for archives:\r\n1 file, 203 bytes (1 KiB)\r\n\r\nListing archive: tmp2.7z\r\n\r\n--\r\nPath = tmp2.7z\r\nType = 7z\r\nPhysical Size = 203\r\nHeaders Size = 186\r\nMethod = LZMA2:12\r\nSolid = -\r\nBlocks = 1\r\n\r\n   Date      Time    Attr         Size   Compressed  Name\r\n------------------- ----- ------------ ------------  ------------------------\r\n2022-01-20 20:45:02 D....            0            0  tmp2\r\n2022-01-20 20:45:02 ....A            0            0  tmp2\/test.js\r\n2022-01-20 20:44:31 ....A           13           17  tmp2\/README.md\r\n------------------- ----- ------------ ------------  ------------------------\r\n2022-01-20 20:45:02                 13           17  2 files, 1 folders\r\n<\/pre>\n<p>\u89e3\u51cd\u3059\u308b\u5834\u5408\u300cx\u300d\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<pre>\r\n[sora@amber] $ 7z x tmp2.7z\r\n\r\n7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21\r\np7zip Version 16.02 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,6 CPUs x64)\r\n\r\nScanning the drive for archives:\r\n1 file, 203 bytes (1 KiB)\r\n\r\nExtracting archive: tmp2.7z\r\n--\r\nPath = tmp2.7z\r\nType = 7z\r\nPhysical Size = 203\r\nHeaders Size = 186\r\nMethod = LZMA2:12\r\nSolid = -\r\nBlocks = 1\r\n\r\n\r\nWould you like to replace the existing file:\r\n  Path:     .\/tmp2\/test.js\r\n  Size:     0 bytes\r\n  Modified: 2022-01-20 20:45:02\r\nwith the file from archive:\r\n  Path:     tmp2\/test.js\r\n  Size:     0 bytes\r\n  Modified: 2022-01-20 20:45:02\r\n? (Y)es \/ (N)o \/ (A)lways \/ (S)kip all \/ A(u)to rename all \/ (Q)uit? A\r\n\r\nEverything is Ok\r\n\r\nFolders: 1\r\nFiles: 2\r\nSize:       13\r\nCompressed: 203\r\n<\/pre>\n<p>7z\u30b3\u30de\u30f3\u30c9\u3092\u305d\u306e\u307e\u307e\u5b9f\u884c\u3059\u308b\u3068\u8a73\u7d30\u306a\u30aa\u30d7\u30b7\u30e7\u30f3\u304c\u78ba\u8a8d\u53ef\u80fd\u3067\u3059\u3002<\/p>\n<pre>\r\n[sora@amber] $ 7z\r\n\r\n7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21\r\np7zip Version 16.02 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,6 CPUs x64)\r\n\r\nUsage: 7z <command> [<switches>...] <archive_name> [<file_names>...]\r\n       [<@listfiles...>]\r\n\r\n<Commands>\r\n  a : Add files to archive\r\n  b : Benchmark\r\n  d : Delete files from archive\r\n  e : Extract files from archive (without using directory names)\r\n  h : Calculate hash values for files\r\n  i : Show information about supported formats\r\n  l : List contents of archive\r\n  rn : Rename files in archive\r\n  t : Test integrity of archive\r\n  u : Update files to archive\r\n  x : eXtract files with full paths\r\n\r\n<Switches>\r\n  -- : Stop switches parsing\r\n  -ai[r[-|0]]{@listfile|!wildcard} : Include archives\r\n  -ax[r[-|0]]{@listfile|!wildcard} : eXclude archives\r\n  -ao{a|s|t|u} : set Overwrite mode\r\n  -an : disable archive_name field\r\n  -bb[0-3] : set output log level\r\n  -bd : disable progress indicator\r\n  -bs{o|e|p}{0|1|2} : set output stream for output\/error\/progress line\r\n  -bt : show execution time statistics\r\n  -i[r[-|0]]{@listfile|!wildcard} : Include filenames\r\n  -m{Parameters} : set compression Method\r\n    -mmt[N] : set number of CPU threads\r\n  -o{Directory} : set Output directory\r\n  -p{Password} : set Password\r\n  -r[-|0] : Recurse subdirectories\r\n  -sa{a|e|s} : set Archive name mode\r\n  -scc{UTF-8|WIN|DOS} : set charset for for console input\/output\r\n  -scs{UTF-8|UTF-16LE|UTF-16BE|WIN|DOS|{id}} : set charset for list files\r\n  -scrc[CRC32|CRC64|SHA1|SHA256|*] : set hash function for x, e, h commands\r\n  -sdel : delete files after compression\r\n  -seml[.] : send archive by email\r\n  -sfx[{name}] : Create SFX archive\r\n  -si[{name}] : read data from stdin\r\n  -slp : set Large Pages mode\r\n  -slt : show technical information for l (List) command\r\n  -snh : store hard links as links\r\n  -snl : store symbolic links as links\r\n  -sni : store NT security information\r\n  -sns[-] : store NTFS alternate streams\r\n  -so : write data to stdout\r\n  -spd : disable wildcard matching for file names\r\n  -spe : eliminate duplication of root folder for extract command\r\n  -spf : use fully qualified file paths\r\n  -ssc[-] : set sensitive case mode\r\n  -ssw : compress shared files\r\n  -stl : set archive timestamp from the most recently modified file\r\n  -stm{HexMask} : set CPU thread affinity mask (hexadecimal number)\r\n  -stx{Type} : exclude archive type\r\n  -t{Type} : Set type of archive\r\n  -u[-][p#][q#][r#][x#][y#][z#][!newArchiveName] : Update options\r\n  -v{Size}[b|k|m|g] : Create volumes\r\n  -w[{path}] : assign Work directory. Empty path means a temporary directory\r\n  -x[r[-|0]]{@listfile|!wildcard} : eXclude filenames\r\n  -y : assume Yes on all queries\r\n<\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>Mac\u3084Linux\u30677-Zip\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u6271\u3044\u305f\u3044\u5834\u5408\u300cp7zip\u300d\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u4eca\u5f8c7-Zip\u516c\u5f0f\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u30c4\u30fc\u30eb\u304c\u666e\u53ca\u3059\u308b\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u3067\u3059\u304c\u3001\u67af\u308c\u305fp7zip\u306e\u5b58\u5728\u3082\u899a\u3048\u3066\u304a\u304f\u3068\u3044\u3056\u3068\u3044\u3046\u6642\u306b\u4fbf\u5229\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e3b\u306bWindows\u3067\u4eba\u6c17\u306e\u30aa\u30fc\u30d7\u30f3\u30bd\u30fc\u30b9\u306e\u30d5\u30a1\u30a4\u30eb\u30a2\u30fc\u30ab\u30a4\u30d0\u300c7-Zip\u300d\u3002 macOS\u3084Linux\u3067\u306f\u3042\u307e\u308a\u30e1\u30b8\u30e3\u30fc\u3067\u306f\u3042\u308a\u307e\u305b\u3093\u304c\u3001\u5727\u7e2e\u7387\u306e\u9ad8\u3055\u304b\u3089\u3053\u308c\u3089\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3067\u30827-Zip\u5f62\u5f0f\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u6271\u3044\u305f\u3044\u3068\u3044\u3046 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":94487,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[2047],"tags":[3501],"class_list":["post-94335","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tips","tag-7zip"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/94335","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=94335"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/94335\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/94487"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=94335"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=94335"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=94335"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}