Evan Hahn
- 1y ·
-
Public·
-
bigshoulders.city
The tar command is famously hard to use.
To create a tarball, remember "Create A File":
tar -caf my_archive.tar.gz file1.txt file2.png
To extract a tarball, remember "eXtract A File":
tar -xaf my_archive.tar.gz
(This works great on Linux. On macOS and some other systems, the -a flag causes problems during extraction—use -xf instead.)