From 5b040615719fd6163d7c32479096a88bf21662ca Mon Sep 17 00:00:00 2001 From: codesoap <42150522+codesoap@users.noreply.github.com> Date: Sat, 6 Apr 2019 14:40:26 +0200 Subject: [PATCH] pax: add page (#2870) --- pages/common/pax.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 pages/common/pax.md diff --git a/pages/common/pax.md b/pages/common/pax.md new file mode 100644 index 0000000000..16daf6d0ba --- /dev/null +++ b/pages/common/pax.md @@ -0,0 +1,27 @@ +# pax + +> Archiving and copying utility. + +- List the contents of an archive: + +`pax -f {{archive.tar}}` + +- List the contents of a gzipped archive: + +`pax -zf {{archive.tar.gz}}` + +- Create an archive from files: + +`pax -wf {{target.tar}} {{path/to/file1}} {{path/to/file2}} {{path/to/file3}}` + +- Create an archive from files, using output redirection: + +`pax -w {{path/to/file1}} {{path/to/file2}} {{path/to/file3}} > {{target.tar}}` + +- Extract an archive into the current directory: + +`pax -rf {{source.tar}}` + +- Copy to a directory, while keeping the original metadata; `target/` must exist: + +`pax -rw {{path/to/file1}} {{path/to/dir1}} {{path/to/dir2}} {{target/}}`