758

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."

you are viewing a single comment's thread
view the rest of the comments
[-] dotslashme@infosec.pub 139 points 8 months ago

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

[-] SpaceCadet@feddit.nl 49 points 8 months ago

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

Double hyphen "long options" are a typical GNU thing.

[-] paraphrand@lemmy.world 13 points 8 months ago

That’s why those commands have two?

[-] SpaceCadet@feddit.nl 11 points 8 months ago

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

[-] MonkderZweite@feddit.ch 9 points 8 months ago
[-] SpaceCadet@feddit.nl 35 points 8 months ago* (last edited 8 months ago)
~# 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
***********************************************

[-] MonkderZweite@feddit.ch 4 points 8 months ago* (last edited 8 months ago)

Ugh. Bsdtar:

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

But it has --help too.

[-] gravitas_deficiency@sh.itjust.works 2 points 8 months ago* (last edited 8 months ago)
~# tar -h || tar --help
load more comments (4 replies)
this post was submitted on 12 Mar 2024
758 points (98.8% liked)

Programmer Humor

32558 readers
495 users here now

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

Rules:

founded 5 years ago
MODERATORS