source

img title=“I don’t know what’s worse–the fact that after 15 years of using tar I still can’t keep the flags straight, or that after 15 years of technological advancement I’m still mucking with tar flags that were 15 years old when I started.”

Wouldn’t tar --help suffice? Afaik, it returns exit code 0.

Depends. Is it GNU tar, BSD tar or some old school Unix tar?

Double hyphen “long options” are a typical GNU thing.

tar -h?

DefederateLemmyMl
link
fedilink
English
35
edit-2
8M
~# tar -h
tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
Try 'tar --help' or 'tar --usage' for more information.
***********************************************
WARNING: Self destruct sequence initiated
***********************************************

~# tar -h || tar --help

Ugh. Bsdtar:

-h (c and r modes only) Synonym for -L.

But it has --help too.

paraphrand
link
fedilink
English
138M

That’s why those commands have two?

DefederateLemmyMl
link
fedilink
English
118M

Yes, the terse Unix version, which needs to be supported for compatibility, and the more readable GNU long option

Create a post

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.
  • 1 user online
  • 144 users / day
  • 303 users / week
  • 694 users / month
  • 2.83K users / 6 months
  • 1 subscriber
  • 1.56K Posts
  • 34.7K Comments
  • Modlog