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