by BeepInABox · 1y ago · 0 comments
Examples:
tar -cf archive.tar.gz foo bar # Create archive.tar.gz from files foo and bar.
tar -tvf archive.tar.gz # List all files in archive.tar.gz verbosely.
tar -xf archive.tar.gz # Extract all files from archive.tar.gzThis will create an uncompressed .tar with the wrong name. You need a z option to specify gzip.
tar -caf foo.tar.xz foo
Will be an xz compressed tarball.