Tradional Usage
  tar {A|c|d|r|t|u|x}[GnSkUWOmpsMBiajJzZhPlRvwo] [ARG...]

It is invigorating.

  • esc@piefed.social
    link
    fedilink
    English
    arrow-up
    8
    ·
    18 hours ago

    It’s pretty simple

    tar
     e[x]tract
     [z]is
     [f]ile
     [v]erbosely
    archive.tar.gz
    --directory=archivedir
    

    For creation it’s pretty much the same but you need to specify [c]reate, e.g. tar czvf archive.tar.gz filestoarchive/ and for lis[t]ing it’s - tar tf archive.tar.gz

    • lawks@aussie.zone
      link
      fedilink
      arrow-up
      1
      ·
      16 hours ago

      That mnemonic is misleading if it’s not gzipped, and unless you’re untarring a stream from a pipe or over a network, you don’t need to tell tar what compression was used when extracting, it knows.