this post was submitted on 07 May 2025
621 points (95.6% liked)

Programmer Humor

32133 readers
1032 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] Hope@lemmy.world 47 points 1 year ago (2 children)

I feel very confident in my understanding of random 8 bit CPUs and their support chips, but asking me to center a div is like this xkcd.

[–] DesolateMood@lemm.ee 20 points 1 year ago (1 children)
[–] Appoxo@lemmy.dbzer0.com 26 points 1 year ago (1 children)

(joke)
YOU FOOL! THE ACTUAL COMMAND WAS tar -?

[–] gravitas_deficiency@sh.itjust.works 5 points 1 year ago (1 children)

That dash looks an awful lot like an em-dash

Normal: -

Em:

[–] madjo@feddit.nl 1 points 1 year ago

That reminds me of this Elle Cordova short: https://youtube.com/shorts/ky0YOo7_Y0o

[–] firelizzard@programming.dev 6 points 1 year ago (5 children)

I’ve never understood why people are so intimidated by tar

[–] MajinBlayze@lemmy.world 32 points 1 year ago (3 children)
[–] zurohki@aussie.zone 13 points 1 year ago (1 children)

Nobody wants to deliberately use the wrong compression type when extracting, so modern tar will figure out the compression itself if you just point it at a file. So tar -xf filename works on almost anything. You don't need to remember which flag to use on a .tar.bz2 file and which one for a .tar.xz file.

[–] MajinBlayze@lemmy.world 3 points 1 year ago (1 children)

That doesn't give me a memorable mnemonic though.

[–] exu@feditown.com 9 points 1 year ago* (last edited 1 year ago) (1 children)
[–] anzo@programming.dev 3 points 1 year ago (1 children)

yeah, but then how am I supposed to remember "tar" ? :P

[–] exu@feditown.com 6 points 1 year ago

Tape ARchive -eXtract File

[–] QuadratureSurfer@lemmy.world 12 points 1 year ago (1 children)

Thanks! This will definitely help me to remember it from now on.

Me 6 months from now:

tar -EZVF

[–] lord_ryvan@ttrpg.network 1 points 1 year ago

I was about to say tar -CompressZeVuckingFile; great mnemonic and I use it every time!

[–] spankmonkey@lemmy.world 7 points 1 year ago

It is sticky and pretty much ruins clothes.

[–] qjkxbmwvz@startrek.website 2 points 1 year ago (1 children)
[–] firelizzard@programming.dev 0 points 1 year ago* (last edited 1 year ago) (1 children)

I almost never create a tarball, so I have to look up the syntax for that. Which is as simple as man tar. But as far as extracting it almost couldn't be easier, tar xf <tarball> and call it a day. Or if you want to list the contents without extracting, tar tf <tarball>. Unless you're using an ancient version of tar, it will detect and handle whatever compression format you're using without you having to remember if you need z or J or whatever.

[–] lord_ryvan@ttrpg.network 1 points 1 year ago* (last edited 1 year ago)

It can be easier if you're used to the dash before the arguments; it's optional but you can put them:

tar -cf   # Compress File
tar -xf   # Xtract File
[–] merc@sh.itjust.works 1 points 1 year ago (1 children)

One reason is that tar supports both traditional style args "tar tf <filename.tar>" and unix-style args "tar -tf <filename.tar>" but there are subtle differences in how they work.

[–] firelizzard@programming.dev 1 points 1 year ago (1 children)

Literally the only time I’ve ever run into that is when I was trying to manipulate the path it extracted to. In 99% of cases I’m doing tf, xf, or cf plus flags for the compression type, etc, and those differences are irrelevant.

[–] merc@sh.itjust.works 1 points 1 year ago (1 children)

I used something recently where it wasn't possible to use the traditional-style args. I think it was a "diff", which meant I needed a "-f". It wasn't a big deal, but, occasionally it does happen.

[–] firelizzard@programming.dev 2 points 1 year ago

I’m not saying it doesn’t happen. This thread started because I said I’ve never understood why people talk like tar is some indecipherable black magic. Common tasks are easy and there’s a man page for everything else.

[–] eager_eagle@lemmy.world 1 points 1 year ago* (last edited 1 year ago)

I got tired of looking up the options for each possible combination of archiving + compression, so today I have a "magic" bash function that can extract almost any format.

Then for compressing, I only use zip, which doesn't need any args other than the archive name and the thing you're compressing. It needs -r when recursing on dirs, but unlike "eXtract" and "Ze", that's a good mnemonic.