Hacker News new | ask | show | jobs
by avg_dev 1415 days ago
I’ve never understood that one. I realize it’s just a joke, but xvf/cfv (extract/compress, view, uh,. Ok I did have to look up f, which I think is file) and the z for gzip is one of the few commands I have no trouble remembering.
2 comments

Though if you include the dash to use those as flags, the second one is wrong (it treats the "v" as the file name for "f"). Without the dash, the next positional argument is the file name.

Examples: These do the same thing:

  tar cfv foo.tar a b c
  tar cvf foo.tar a b c
  tar -cvf foo.tar a b c
This errors, trying to add foo.tar to archive v:

  tar -cfv foo.tar a b c
Correct, it's -cvf.
Even easier: tar --help