News for hackers. Stuff that matters.
Re:Use long flags when scripting (2013) by stack_underflow on Friday September 18, 2020 @05:34PM (#24522104)
These two commands should fit most of your use cases:

  tar cf dir.tar dir          # mnemonic: 'create file' <tar-file-name> <dir-to-tar>
  tar xf dir.tar(.gz|bz2|...) # mnemonic: 'eXtract file' <tar-file-name>
On systems with "modern" versions of tar `-x` is capable of recognizing which compression format is used and doesn't require the explicit `-j/z` flags you usually see.
Re:Use long flags when scripting (2013) by corpMaverick on Friday September 18, 2020 @07:28PM (#24522874)
Exactly, these are the only ones I know and never get confused. Actually I use cvzf and xvzf.
Re:Use long flags when scripting (2013) by stjohnswarts on Saturday September 19, 2020 @12:06AM (#24524945)
you might want to at -p for preserving permissions in there are well, handy for archiving