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.)

evanhahn.com/mnemonic-to-remem

2
Share
Share on Mastodon
Share on Twitter
Share on Facebook
Share on Linkedin
Replies