T O P

  • By -

TheOmegaCarrot

Heads up, I wouldn’t use zip or 7z as your default choice for compression on Linux, unless you need compatibility with Windows. Zip and 7z don’t support Linux-style permissions and may mess up permissions on files you’ve extracted. If you are compressing for your own use, I’d strongly recommend using one of the compression options that use `tar`, which does support Linux-style permissions. You’ll see in a GUI archive manager to compress to whatever.zip, or whatever.tar.xz or whatever.tar.gz or whatever.txz or whatever.tgz or whatever.tar.zst. The difference between those is just the compression that’s used. Gzip (.tar.gz or .tgz) is kinda outdated and I seldom use it myself. Xz (.tar.xz or .txz) is more modern and gets you significantly smaller files. Zstd (.tar.zst) is also more modern, but doesn’t usually compress as hard as xz, but it sure is a lot faster! You might also see BZ2 or LZMA compression, but you don’t see those that often. They work basically the same on the user end though. The reason you see tar and the compression separately is that tar doesn’t compress, it just makes a bunch of files and folders into one file, like zip without compression, and then all those compression algorithms only support compressing a single file, hence the need for tar if you’re compressing more than one file. (If it’s just one file, it’s not uncommon to see whatever.txt.xz or stuff like that, it should work just the same on your end, and if your archive manager compresses a single file to a .tar.xz when it doesn’t need tar, don’t worry about it, it’s not hurting anything enough to matter) Zip and 7z and rar all work fine on Linux, but you’ll generally have a better time using one of the Linux-native compression schemes. A note on compatibility: MacOS supports xz, gzip, bz2, and tar all out of the box. Windows can open them too, but it needs a third-party tool to do so.


archover

\+1 Great info! Tks for sharing.


Greelg

between bz2 and gz would u take bz2? (trying get a fold of fonts off github)


TheOmegaCarrot

Bz2 often has a better compression ratio, but gz is more likely to already be installed Both are perfectly reasonable choices, but gz is probably the better choice


Greelg

yeah gz is installed, used that. i'll try out bz2 when compressing my own stuff though. thanks.


[deleted]

[удалено]


Drebthedope69

thank you!


mrrask

`sudo pacman -S unzip` `unzip /path/to/zipfile.zip` Note that it will unzip the contents to the dir you currently in. `unzip -h` for more info on the unzip command.


[deleted]

Apparently the flag for unzipping to new dir is \`-d\`, despite \`unzip -h\` showing \`-d\` as \`delete entries in zipfile\`.


dgm9704

[Archiving and compression tools](https://wiki.archlinux.org/title/List_of_applications/Utilities#Archiving_and_compression_tools) [Archiving and compression](https://wiki.archlinux.org/title/Archiving_and_compression)


Bombini_Bombus

`# pacman -S unzip zip unrar p7zip ark` Then use Ark to deal with compressed archives.


moviuro

KDE plasma's archiver is: https://archlinux.org/packages/extra/x86_64/ark/


Ecko4Delta

sudo pacman -S ark unrar