In that case, the output filename will have the same name as the input filename, but with the compression extension stripped from the end and the input file will be deleted if successful. $ arc decompress original_test.txtįor convenience, the output file (second argument) may be omitted. Decompress a single file # Syntax: arc decompress $ arc compress test.txt compressed_įor convenience, the output file (second argument) may simply be a compression format (without leading dot), in which case the output filename will be the same as the input filename but with the format extension appended, and the input file will be deleted if successful. $ arc extract foo/hello.txt extracted/hello.txtĬompress a single file # Syntax: arc compress rw-r-r- matt staff 288 11:52:38 -0600 MDT dist/gitcookie.sh.encĮxtract a specific file or folder from an archive # Syntax: arc extract List archive contents # Syntax: arc ls ĭrwxr-xr-x matt staff 0 15:47:18 -0600 MDT dist/ The archive name must end with a supported file extension-this is how it knows what kind of archive to make. (The destination path is optional default is current directory.) ![]() (At least one input file is required.) Extract entire archive # Syntax: arc unarchive $ arc archive file1.txt images/file2.jpg folder/subfolder Command Use Make new archive # Syntax: arc archive Or download binaries from the releases page. Install go get -u /mholt/archiver/cmd/arc Optionally continue with other files after an error.Zip: store (not compress) already-compressed files.Optionally create a top-level folder to avoid littering a directory or archive root with files.Several archive and compression formats supported.Streaming compression and decompression.Traverse archive contents without loading them.Stream files in and out of archives without needing actual files on disk.Extract specific files/folders from archives.Make whole archives from a list of files.It is powered by the Go standard library and several third-party, pure-Go libraries.įiles are put into the root of the archive directories are recursively added, preserving structure. The arc command runs the same on all platforms and has no external dependencies (not even libc). Simply name the input and output file(s). Package archiver makes it trivially easy to make and extract common archive formats such as zip and tarball (and its compressed variants). A powerful and flexible library meets an elegant CLI in this generic replacement for several of platform-specific, format-specific archive utilities. Introducing Archiver 3.1 - a cross-platform, multi-format archive utility and Go library. (txz) Extract(source, target, destination) (tsz) Extract(source, target, destination) (tlz4) Extract(source, target, destination) (tgz) Extract(source, target, destination) (tbz2) Extract(source, target, destination) ![]() Extract a specific file or folder from an archive
0 Comments
Leave a Reply. |