User ID: mio
Subject: pax Examples

Some examples of the pax(1) command.

List Archive Contents

pax -f archive.tar

New flag(s):

Alternative

pax < archive.tar

Create Archive

pax -wf archive.tar file1.txt file2.txt

New flag(s):

Alternative

pax -w file1.txt file2.txt > archive.tar

Contents

$ pax < archive.tar
file1.txt
file2.txt

Update Archive

pax -waf archive.tar file3.txt file4.txt

New flag(s):

Contents

$ pax -f archive.tar
file1.txt
file2.txt
file3.txt
file4.txt

Extract Archive

pax -rf archive.tar

New flag(s):

Alternative

 pax -r < archive.tar

Extract Gzip

Since a lot of tar's are compressed using Gzip, it may be useful to decompress the Gzip and extract underlying tar without modifying the original archive.

gzip ‐dc < archive.tar.gz | pax ‐r

Gzip flags: