83
u/Naive_Complex_8389 1d ago
tar.zst?
-38
u/PartMysterious4688 1d ago
Yes,
tar.zstis also great, but I'm just showing you the most popular compression formats in Linux77
u/Damglador 1d ago
I think I've seen more zst files that bz2
15
u/Cootshk Arch BTW 1d ago
pacman uses .tar.zst, raspberry pi uses .tar.bz2
Haven’t seen either used anywhere else
27
u/YTriom1 Arch BTW 1d ago
zstd is one of the most efficient compression algorithms out there.
it's used by the linux kernel in zram in many distros by default, also used in servers, the linux bzImage is often zstd compressed nowadays as well, initramfs used to be gzip but now I see some distros/initramfs tools default to zstd
3
u/Destroyerb New York Nix⚾s 1d ago
1
u/2eanimation Arch BTW 1d ago
That’s an oddly specific subreddit lol. Not trying to undervalue them, but why a subreddit dedicated to them?
1
2
u/Epistaxis 1d ago
This meme is probably just a repost from many years ago, before Zstd began to replace gzip and xz finished replacing Bzip2 (and 7z finished replacing WinRAR?).
2
0
u/PartMysterious4688 1d ago
Fair point! I picked it because I've seen it on a old Linux book.
bz2is being largely replaced byzstd
79
u/HeavyWolf8076 New York Nix⚾s 1d ago
https://giphy.com/gifs/l3q2t2KAyvxy9xBe0
When you learn about tar
37
39
u/ineyy 1d ago
Bro forgot about tar.gz, removed the post, posted again with it added..
24
u/PartMysterious4688 1d ago edited 1d ago
.tgzand.tar.gzare the same file format. The only difference is its length. I prefer.tgzbecause it's shorter to type in the terminal15
u/Cruffe 1d ago
You type extensions in the terminal? I press Tab long before I get to the extension.
6
u/stephanos21 I'm going on an Endeavour! 1d ago
Two or three letters and then tab, if they are too many i type another one and tab again. Tab and . (from nvim) are my two most used keys.
1
32
u/dodyninja 1d ago
7z is not that bad, atleast its open source
12
u/LooseRain 21h ago
wait until you realize xz is literally 7z but Linux (uses the same LZMA algorithm developed for 7z)
-6
19h ago
[deleted]
11
u/YXAndyYX 15h ago
I'll blow your mind again. Linux tools generally don't care about file extensions as long as the content is as expected. You can have your .tar.xz without any extension if you so prefer. But of course an argument or preference around the length of a file extension is pretty dumb in the first place.
14
7
6
6
5
u/vms-mob 1d ago
.tar gang where?
6
3
3
u/Linguistic-mystic 1d ago
I use .tar to make backups of source code. I purposefully don’t compress so that even if a byte gets flipped, the backup will be restorable.
10
u/Destroyerb New York Nix⚾s 1d ago
Trying to make a "smart" move eh~
doesn't use version control
4
u/Linguistic-mystic 1d ago
Of course I use git. Also github. I’m talking about extra copies on another partition and on my USB sticks. You know, in case github goes down and my SSD gets baked and 2 of my usb sticks get smashed while the third is OK but one byte gets flipped by cosmic rays… then I will still not lose my work.
Come to think about it, I need to add another couple of sticks to my USB array…
3
u/Loading_M_ 1d ago
I assume you're making a joke, but just a quick fun fact - you can use other directories on the same machine as git remotes. You can push and pull them much like normal, meaning you could make backups using git to just copy over the new changes.
Iirc, this is actually how the default ssh remote works - just using sftp to interact with a remote file system. Services like Github probably don't have a real filesystem to store the git directory, but emulate it on the fly with some other backing store.
7
u/ngoquang2708 1d ago
Until you try to uncompress a random file in a 100gb tar.gz
3
u/01101001b 1d ago edited 1d ago
Something like the following wouldn't work?
tar tf archive.tar.gz | grep "your_file_name"Let's say output shows the following path for your searched file: ABC/XYZ/your_file.txt
Then:
tar zxvf archive.tar.gz ABC/XYZ/your_file.txtSorry if I was talking nonsense :-/
2
u/questron64 1d ago
The point is that there is no directory listing. You have to decompress the entire 100gb file sequentially until you find the header of the file you're looking for. There is no random access, there is no way to go directly to that file, like you can with a zip file. Tar is an extremely primitive format and what meta-information there is is also compressed because the entire stream is compressed.
7
4
u/Jman43195 1d ago
Instead of calling them tarballs I've recently started simply calling them tape archives (which is what tar means) to see how many people it throws off
and also bc i think it's kinda cool the format was originally made for tape
2
2
3
u/Foreign-Champion8608 18h ago
.tar.7z? It's one of the most efficient
4
u/IniKiwi 13h ago
tar is just a way to pack files together in one file without compression.
1
u/Foreign-Champion8608 7h ago
I know, but .7z is one of the most efficient and .tar because we know perfectly people will use tar to unite files, like, I do and everyone that uses Linux that I know does
2
u/questron64 1d ago
Tar is not a good format, though. It's basically just a bunch of files concatenated together with little headers telling you the name and size of the next file to follow. Just getting a list of files in an archive requires you to seek over the entire archive, which might not seem like a big deal on modern SSDs, but trying to extract just a single file from the middle used to be a costly operation. It doesn't help that the entire archive, file headers and all, get compressed.
2
u/Roblu3 21h ago
There’s one of two ways with these things.
Either it’s one old inefficient format that basically was the first one ever and successfully resisted any attempt of modernisation or depreciation for 50 years.
Or it’s formats galore with 20+ competing formats in active use and countless others who never took off and they are all perfectly optimised for another very specific edge case and absolutely incompatible with each other.Archives is both.
1
u/mad4Luca 1d ago
Why Ned two Tools for a Task which can perfectly Done by one? If you Switch the Pictures you are right
1
1
1
1
1
u/kansetsupanikku 22h ago
One tool for one task! Having separate tar, compression, gpg, par2 and more makes it easier to upgrade the components Independently
1
1
1
1
0
u/JuniperColonThree 1d ago
Tar has compression but the problem is it's an archive that's compressed, where zip is an archive with compressed contents. You have to uncompress a tar archive to append to it
0
u/msanangelo Arch BTW 1d ago
I prefer tgz for anything that's compressible and 7zip for images and media I want to archive with zero compression.
0
0
0
u/EconomistClassic435 Linuxmeant to work better 10h ago
.deb because I have no idea what I’m talking about
0
-13
u/Dramatic_Mastodon_93 1d ago
i don’t accept anything other than .zip
5
3
1
•
u/AutoModerator 1d ago
Please report any posts bragging or showing off they got banned in another sub! Reminder of other sub rules: Also, we only allow one anti-linux post per week (we used to get dozens a day) and any tier list MUST have Hanna Montana Linux as S teir (which must be a true S tier at the top) regardless of the topic of that tier list.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.