Oblig. XKCD:
tar -h
Edit: wtf… It’s actually
tar -?
. I’m so disappointedboom
tar eXtactZheVeckingFile
Me trying to decompress a .tar file
Joke’s on you, .tar isn’t compression
That’s not going to stop me from getting confused every time I try!
You don’t need the v, it just means verbose and lists the extracted files.
You don’t need the z, it auto detects the compression
Yeah, I just tell our Linux newbies
tar xf
, as in “extract file”, and that seems to stick perfectly well.That’s still kinda new. It didn’t always do that.
Per https://www.gnu.org/software/tar/, it’s been the case since 2004, so for about 19 and a half years…
Telling someone that they are Old with saying they are old…
Something something don’t cite the old magics something something I was there when it was written…
Right, but you have no way of telling what version of tar that bomb is running
You may not, but I need it. Data anxiety is real.
tar -xzf
(read with German accent:) extract the files
Ixtrekt ze feils
German here and no shit - that is how I remember that since the first time someone made that comment
Same. Also German btw 😄
Not German but I remember the comment but not the right letters so I would have killed us all.
That’s so good I wish I needed to memorize the command
z
is for gzip archives only.tar xf
for eXtract the File
tar -uhhhmmmfuckfuckfuck
The Fish shell shows me just the past command with tar So I don’t need to remember strange flags
I use zsh and love the fish autocomplete so I use this:
https://github.com/zsh-users/zsh-autosuggestions
Also have
fzf
forctrl + r
to fuzzy find previous commands.I believe it comes with oh-my-zsh, just has to be enabled in plugins and itjustworks™
man tar
you never said I can’t run a command before it.
without looking, what’s the flag to push over ssh with compression
scp
not compressed by default
That’s yet another great joke that GNU ruined.
Zip makes different tradeoffs. Its compression is basically the same as gz, but you wouldn’t know it from the file sizes.
Tar archives everything together, then compresses. The advantage is that there are more patterns available across all the files, so it can be compressed a lot more.
Zip compresses individual files, then archives. The individual files aren’t going to be compressed as much because they aren’t handling patterns between files. The advantages are that an error early in the file won’t propagate to all the other files after it, and you can read a file in the middle without decompressing everything before it.
Yeah that’s a rather important point that’s conveniently left out too often. I routinely extract individual files out of large archives. Pretty easy and quick with zip, painfully slow and inefficient with (most) tarballs.
deleted by creator
Can you evaluate the directory tree of a tar without decompressing? Not sure if gzip/bzip2 preserve that.
Nowhere in here do you cover bzip, the subject of this meme. And tar does not compress.
It’s just a different layer of compression. Better than gzip generally, but the tradeoffs are exactly the same.
Well, yes. But your original comment has inaccuracies due to those 2 points.
Obligatory shilling for unar, I love that little fucker so much
- Single command to handle uncompressing nearly all formats.
- No obscure flags to remember, just
unar <yourfile>
- Makes sure output is always contained in a directory
- Correctly handles weird japanese zip files with SHIFT-JIS filename encoding, even when standard
unzip
doesn’t
gonna start lovingly referring to good software tools as “little fuckers”
Happy cake day!
cheers!
What weird Japanese zip files are you handling?
Voicebanks for Utau (free (as in beer, iirc) clone of Vocaloid) are primarily distributed as SHIFT-JIS encoded zips. For example, try downloading Yufu Sekka’s voicebank: http://sekkayufu.web.fc2.com/ . If I try to
unzip
the “full set” zip, it produces a folder called РсЙ╠ГЖГtТPУ╞Й╣ГtГЛГZГbГgБi111025Бj. But unar detects the encoding and properly extracts it as 雪歌ユフ単独音フルセット(111025). I’m sure there’s some flag you can pass tounzip
to specify the encoding, but I like havingunar
handle it for me automatically.Ah, that’s pretty cool. I’m not sure I know of that program. I do know a little vocaloid though, but I only really listen to 稲葉曇(Inabakumori).