From a23d41742eb24815162e107b41ed40bb13cda9b7 Mon Sep 17 00:00:00 2001 From: Onni Hakala Date: Sat, 24 May 2025 07:51:59 +0200 Subject: [PATCH] atool: move to common and add examples (#16426) Co-authored-by: Managor <42655600+Managor@users.noreply.github.com> --- pages/common/atool.md | 37 +++++++++++++++++++++++++++++++++++++ pages/linux/atool.md | 20 -------------------- 2 files changed, 37 insertions(+), 20 deletions(-) create mode 100644 pages/common/atool.md delete mode 100644 pages/linux/atool.md diff --git a/pages/common/atool.md b/pages/common/atool.md new file mode 100644 index 0000000000..c97d80b6fd --- /dev/null +++ b/pages/common/atool.md @@ -0,0 +1,37 @@ +# atool + +> A script for managing file archives of various types. +> `atool` uses external archiver programs but provides a consistent command-line interface for listing, extracting, creating, and managing archives. +> More information: . + +- List files in an archive: + +`atool {{[-l|--list]}} {{path/to/archive.zip}}` + +- Extract an archive (safely creates a subdirectory if needed): + +`atool {{[-x|--extract]}} {{archive.tar.gz}}` + +- Extract an archive to a specific directory: + +`atool {{[-X|--extract-to]}} {{path/to/output_directory}} {{archive.rar}}` + +- Display a specific file's content from an archive to standard output (like `cat`): + +`atool {{[-c|--cat]}} {{archive.tar}} {{path/to/file_in_archive.txt}}` + +- Create a new archive from specified files and/or directories: + +`atool {{[-a|--add]}} {{new_archive.zip}} {{path/to/file1 path/to/file2 ...}}` + +- List files in an archive and send the output through a pager: + +`atool {{[-l|--list]}} {{[-p|--pager]}} {{large_archive.tar.bz2}}` + +- Extract multiple archives at once (each to its own subdirectory if needed): + +`atool {{[-x|--extract]}} {{[-e|--each]}} {{archive1.zip}} {{archive2.tar.gz}} {{*.rar}}` + +- Repack an archive from one format to another (e.g., .tar.gz to .tar.7z): + +`atool {{[-r|--repack]}} {{old_archive.tar.gz}} {{new_archive.tar.7z}}` diff --git a/pages/linux/atool.md b/pages/linux/atool.md deleted file mode 100644 index 53355f551c..0000000000 --- a/pages/linux/atool.md +++ /dev/null @@ -1,20 +0,0 @@ -# atool - -> Manage archives of various formats. -> More information: . - -- List files in a Zip archive: - -`atool {{[-l|--list]}} {{path/to/archive.zip}}` - -- Unpack a tar.gz archive into a new subdirectory (or current directory if it contains only one file): - -`atool {{[-x|--extract]}} {{path/to/archive.tar.gz}}` - -- Create a new 7z archive with two files: - -`atool {{[-a|--add]}} {{path/to/archive.7z}} {{path/to/file1 path/to/file2 ...}}` - -- Extract all Zip and rar archives in the current directory: - -`atool {{[-e|--each]}} {{[-E|--extract]}} {{*.zip *.rar}}`