News for hackers. Stuff that matters.
Re:Show HN: Extract it – Because nobody can remember tar com... by gfodor on Thursday September 10, 2015 @08:32PM (#10201366)
Why not just learn what the flags mean? If you're cargo culting it, and not learning the point of the "xfvz" (it means eXtract, from the specified File, with a Visual dump of the extraction, from a gZipped archived tarball) -- you'll never remember it.
Re:Show HN: Extract it – Because nobody can remember tar com... by reedlaw on Thursday September 10, 2015 @08:55PM (#10201447)
"tar xvzf" is already a part of my muscle memory. Occasionally I need to change the "z" to a "j" for bzip2 archives. And the "x" becomes a "c" if I'm Creating an archive rather than eXtracting.

Also this site doesn't show the command for files with ".tgz" extensions.

Re:Show HN: Extract it – Because nobody can remember tar com... by JoshTriplett on Thursday September 10, 2015 @08:57PM (#10201450)
> tar xvzf" is already a part of my muscle memory. Occasionally I need to change the "z" to a "j" for bzip2 archives

With modern tar, just don't include the z at all. "tar -xf" knows how to extract various kinds of compressed tar files automatically.

Re:Show HN: Extract it – Because nobody can remember tar com... by monksy on Thursday September 10, 2015 @09:06PM (#10201469)
Today I learned. I've been doing zxvf for quite a while and I always got annoyed with bz2 files.
Re:Show HN: Extract it – Because nobody can remember tar com... by nstart on Thursday September 10, 2015 @08:56PM (#10201449)
Yeps. I used to have to keep googling whenever I wanted to extract something. Then I decided to learn what the flags meant and realised how easy it was. When doing the command it was a matter of saying it in head ("I am extracting from this gzipped file"). Likewise for compressing. Only difference being 'c' stood for Compressing.
Re:Show HN: Extract it – Because nobody can remember tar com... by deciplex on Thursday September 10, 2015 @09:10PM (#10201482)
You adding a lot of extra words, and there are many other options to tar, and you've left out making an archive, but yeah:

-cf Create File -xf eXtract File

then you have the adverb v, and the adjective z:

-vczf Verbosely Create gZip File -vxzf Verbosely eXtract gZip File

I find it difficult to remember the arguments mostly because I seldom use tar, not because the arguments are unintuitive or something.

Re:Show HN: Extract it – Because nobody can remember tar com... by Hello71 on Thursday September 10, 2015 @08:43PM (#10201400)
no, "v" means verbose since at least 2.8 BSD: https://www.freebsd.org/cgi/man.cgi?query=tar&manpath=2.8+BS...
[deleted]
Re:Show HN: Extract it – Because nobody can remember tar com... by adrusi on Thursday September 10, 2015 @08:58PM (#10201451)
The f isn't for force. It's for "file" and it takes the filename as a parameter — that's why you usually see it at the end of the character sequence, a filename has to immediately follow it. If you don't specify -f tar will read from stdin for extraction or write to stdout for creation.
Re:Show HN: Extract it – Because nobody can remember tar com... by SeldomSoup on Friday September 11, 2015 @12:06AM (#10201960)
Seems like a redundant flag. Many utilities are perfectly fine reading from stdin if no [file] is specified, without any kind of -f flag.
Re:Show HN: Extract it – Because nobody can remember tar com... by adrusi on Friday September 11, 2015 @08:43AM (#10203319)
It's redundant for extraction. For creation (-c) where you can list many files, it's just a choice some unix developer made to allow the destination file to be specified independent of order. I think there'd be some awkward edge cases otherwise.

Anyway, adding verbosity to discourage operating on static files and prefering being on a pipeline could be considered a feature.