A tool for extracting/archiving files and directories in multiple formats.
There are many archive formats and their tools.
The one big problem with using the tools is that their interfaces are slightly different and it makes us confused.
Then, the totebag
treats the archive files as the same interface.
The tool can extract archive files and archive files and directories.
A tool for extracting/archiving files and directories in multiple formats.
Usage: totebag [OPTIONS] [ARGUMENTS]...
Arguments:
[ARGUMENTS]... List of files or directories to be processed.
'-' reads form stdin, and '@<filename>' reads from a file.
In archive mode, the resultant archive file name is determined by the following rule.
- if output option is specified, use it.
- if the first argument is the archive file name, use it.
- otherwise, use the default name 'totebag.zip'.
The format is determined by the extension of the resultant file name.
Options:
--to-archive-name-dir extract files to DEST/ARCHIVE_NAME directory (extract mode).
-C, --dir <DIR> Specify the base directory for archiving or extracting. [default: .]
-i, --ignore-types <IGNORE_TYPES> Specify the ignore type. [possible values: default, hidden, git-ignore, git-global, git-exclude, ignore]
-L, --level <LEVEL> Specify the compression level. [default: 5] [possible values: 0-9 (none to finest)]
For more details of level of each compression method, see README. [default: 5]
-n, --no-recursive No recursive directory (archive mode).
-l, --long List entries in the archive file with long format.
--log <LOGLEVEL> Specify the log level [default: warn] [possible values: error, warn, info, debug, trace]
-m, --mode <MODE> Mode of operation. [default: auto] [possible values: auto archive, extract, list]
-o, --output <DEST> Output file in archive mode, or output directory in extraction mode
--overwrite Overwrite existing files.
-h, --help Print help (see more with '--help')
-V, --version Print version
Level | |
---|---|
Cab | 0: None, otherwise: MsZIP; see CompressionType. |
Gzip | See Compression. |
Bzip2 | See Compression. |
Xz | See XzEncoder. |
Zstd | Map 0-9 to 1-22, See Encoder. |
Zip | 0: No compression, 1-3: Deflate (10, 24, 264), 4-6: Bzip2 (1, 6, 9), 7-9: Zstd (-7, 3, 22); see FileOptions. |
7z | 0-4: LZMA, 5-9: LZMA64 (SevenZMethod) |
brew install tamada/tap/totebag
docker run -it --rm -v $PWD:/workdir ghcr.io/tamada/totebag:0.7.8 [OPTIONS] [ARGUMENTS]...
- Working directory:
/workdir
- User:
nonroot
- Haruaki Tamada (tamada)
The general word, totebag, is a bag for carrying things. From this, I chose the name of the tool, totebag, as a tool for packing files and directories carelessly.
This logo was generated by Bing Image Creator.
- magiclen/xcompress
- XCompress is a free file archiver utility on Linux, providing multi-format archiving to and extracting from ZIP, Z, GZIP, BZIP2, LZ, XZ, LZMA, 7ZIP, TAR, RAR and ZSTD.
- meuter/arkiv-rs
- Thin convenience library to manipulate compressed archive of vairous types through a single interface.