Me removing the plastic case of a 2.5’ sata ssd to make it physically smaller
That’s a big drive.
Where’s .7z people?
Right here! I love 7z
This guy tar balls
I still wonder what that’s like. Somebody must still occasionally get a notification that SOMEWHERE somebody paid for their WinRAR license and is like “WOAH WE GOT ANOTHER ONE!”
Never looked back since 7z though. :D
most of the things i want to send around my network in archives are already compressed binary files, so i just tar everything.
You reinvented zip and didn’t even know it.
tar
was nearly and adult whenzip
was born.See my reply here: https://midwest.social/comment/10257041
The two aren’t really equivalent. They make different tradeoffs. The scheme of “compress individual files, then archive” from GP is what zip does. Tar does “archive first, then compress the whole thing”.
The link does not load for some reason, but tar itself does not compress anything. Compression can (and usually is) applied afterwards, but that’s an additional integration that is not part of Tape ARchive, as such.
tar cvjf compressed-shit.tar.bz2 /path/to/uncompressed/shit/
Only way to fly.
I stopped doing that because I found it painfully slow. And it was quicker to gzip and upload than to bzip2 and upload.
Of course, my hardware wasn’t quite as good back then. I also learned to stop adding ‘v’ flag because the bottleneck was actually stdout! (At least when extracting).
for the last 14 years of my career, I was using stupidly overpowered Oracle exadata systems exclusively, so “slow” meant 3 seconds instead of 1.
Now that I’m retired, I pretty much never need to compress anything.
I’m curious about the contents in your compressed shit.
I’m the weird one in the room. I’ve been using 7z for the last 10-15 years and now
.tar.zst
, after finding out that ZStandard achieves higher compression than 7-Zip, even with 7-Zip in “best” mode, LZMA version 1, huge dictionary sizes and whatnot.zstd --ultra -M99000 -22 files.tar -o files.tar.zst
You can actually use Zstandard as your codec for 7z to get the benefits of better compression and a modern archive format! Downside is it’s not a default codec so when someone else tries to open it they may be confused by it not working.
That is an interesting implementation of security through obscurity…
How does one enable this on the standard 7Zip client?
On Windows, it’s easy! Unfortunately, on Linux, as far as I know, you currently have to use a non-standard client.
Oblig. XKCD:
tar -h
boom
That’s yet another great joke that GNU ruined.
tar -uhhhmmmfuckfuckfuck
without looking, what’s the flag to push over ssh with compression
scp
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 may not, but I need it. Data anxiety is real.
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
tar -xzf
(read with German accent:) extract the files
That’s so good I wish I needed to memorize the command
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.
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.
.tar.xz
Yeah, it’s similar enough to tar.gz to always confuse me.
wait until you learn about
.tar.lz
Tar lzma nuts, amirite?
TAR LAZER!
Good for image backups, after zeroing empty space.
xz is quite slow though
tar c file | pxz > file.tar.xz
pixz is in “extra” repo in arch. Same as pigz.
There’s several levels you can use to trade off additional space for requiring more processing power. That being said, I hate xz and it still feels slow AF every time I use it.
It starting 0.5 seconds slower than usual saved us all a bit of a headache as it turns out.
I hate 7z, it’s slow (at least for me) and for some reason I often have problems with these files
Same algo as in 7z
I had no idea about that!
I unironically used xz for a long time. It was just eazy and all around very good compress. A close second is 7zip because I used it on windows for years.
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.
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.
A tar directory also preserves file permissions. And can preserve groups/ownership if needed.
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.
Can you evaluate the directory tree of a tar without decompressing? Not sure if gzip/bzip2 preserve that.
.tar.gz
, or.tgz
if I’m in a hurry…or shipping to MSDOS
I use the command line every day, but can’t be bothered with all the compression options of tar and company.
zip -r thing.zip things/
andunzip thing.zip
are temptingly more straightforward.Need more compression?
zip -r -9 thing.zip things/
. Need a faster option? Use a smaller digit.Zip is fine (I prefer 7z), until you want to preserve attributes like ownership and read/write/execute rights.
Some zip programs support saving unix attributes, other - do not. So when you download a zip file from the internet - it’s always a gamble.
Tar + gzip/bz2/xz is more Linux-friendly in that regard.Also, zip compresses each file separately and then collects all of them in one archive.
Tar collects all the files first, then you compress the tarball into an archive, which is more efficient and produces smaller size.tar czf thing.tgz things/ tar xzf thing.tgz
yes, and you still need zhe mnemonics
There’s gotta be a buncha tools that Clippy into the terminal to say “did you mean ____?” right? Including some new ones where they trained/fine-tuned a language model on man pages?
Interesting it’s not the most popular thing to use a GUI and use shortcuts for everything you want to do while still having the option to click through a menu or wizard for whatever you haven’t memorized. I suppose the power and speed of the command line are difficult to match if you introduce anything else, and if you spend time using a user interface that’s time you can’t spend honing your command line skills.
There’s
thefuck
, but it hasn’t given me good suggestions.
“yes i would love to
tar -xvjpf
my files”– statement dreamed up by the utterly insane
Present, I’m the
tar cvJf
insane
The problem with that is that it will not preserve flags and access rights.
Good ol -xvjpf
That’s fine. I’m use to being unrepresented in the arj, lha, and uc2 crew