3dfa66bb7be96f6336242ab439b878b264d88669
[webi-installers/.git] / arc / README.md
1 ---
2 title: Archiver (arc)
3 homepage: https://github.com/mholt/archiver
4 tagline: |
5   Arc is a cross-platform, multi-format archive utility.
6 ---
7
8 ## Updating `arc`
9
10 `webi arc@stable`
11
12 Use the `@beta` tag for pre-releases.
13
14 ## Cheat Sheet
15
16 > Archiver (`arc`) is a powerful and flexible library meets an elegant CLI in
17 > this generic replacement for several platform-specific or format-specific
18 > archive utilities.
19
20 Much like MacOS Finder and Windows Explorer, the default behavior of `arc` is to
21 create a top-level directory if one does not exist.
22
23 ### List
24
25 ```txt
26 # arc ls <archive file>
27 arc ls   example.zip
28 ```
29
30 ### Unarchive (whole)
31
32 ```txt
33 # arc unarchive <archive file>
34 arc unarchive   example.zip
35 ```
36
37 ### Extract (partial)
38
39 ```txt
40 # arc extract <archive file> <archived path> <extracted path>
41 arc extract   example.zip    example/foo     ~/Downloads/foo
42 ```
43
44 ### Archive (recursive)
45
46 ```txt
47 # arc archive <archive file> <files or folders ...>
48 arc archive   example.zip    ./README.md ./bin ./src
49 ```
50
51 ### Compress (single file)
52
53 ```txt
54 # arc compress <single file> <format>
55 arc compress   ./example.tar xz
56 ```
57
58 ### Decompress (single file)
59
60 ```txt
61 # arc decompress <archive file>
62 arc decompress   ./example.tar.xz
63 ```
64
65 ## Supported extensions
66
67 These are the support compression formats, archive formats, and tar file and
68 other extensions.
69
70 | Compression | Archive  | Tar File | Bare Extension |
71 | ----------- | -------- | -------- | -------------- |
72 | -           | .tar     | -        | -              |
73 | xz          | .tar.xz  | .txz     | .xz            |
74 | gzip        | .tar.gz  | .tgz     | .gz            |
75 | bzip2       | .tar.bz2 | .tbz2    | .bz2           |
76 | brotli      | .tar.br  | .tbr     | .br            |
77 | lzma        | .tar.lz4 | .tlz4    | .lz4           |
78 | snappy      | .tar.sz  | .tsz     | .lsz           |
79 | zstd        | .tar.zst | -        | .zst           |
80 | ZIP         | .zip     | -        | -              |
81 | RAR         | .rar     | -        | -              |