Using Linux? Here Are Your Options For File Compression

Ads by Google

linux file compressionFace it, we have a lot of stuff on our hard drives. While some of us still have plenty of free space left thanks to the ever-expanding size of new hard drives, others have all sorts of data which quickly takes up most of their space. Wherever possible, those people would probably like to be able to compress their data to regain as much free space as possible.

Under Windows, you can compress your data with the file system itself (which can be recognized by the blue file name), but under Linux, ext4 – the default file system for almost all distributions – is not capable of file compression. Don’t worry though, there’s plenty of other ways you can compress your files under Linux – quickly and easily.

Different File Types

linux file compression

Whenever Windows users use the file system to compress their data, they’ll most likely create a .zip file. While this is the most recognized way throughout all operating systems to both compress your data and consolidate all selected files into one package, it certainly isn’t the only way for Linux users to achieve the same thing. There are also .gzip, .z, .lzma, .7z, and .rar files in addition to .zip which you can use. All of these work the same way, but they differ not only in name but in their compression algorithm. Some may be better at compressing some types of files, while some are better at others.

Experienced Linux users might ask about .tar files – these are actually not compressed, but are more commonly known to just package other files together. You’ll often find one or more of the other types of files inside a .tar file, as compressing a file which is already compressed is pretty unhelpful. The file extensions of these files are usually .tar.x, where x is a file type from the previous list.

It should be noted, however, that most distributions will already come with all necessary packages to read and create most of these file types, but any unreadable file types should become readable after a quick search in your respective package manager.

Ads by Google

Easy Graphical Tools

linux file compression

To achieve compression on any system, you can use the appropriate command line tools to achieve what you want. However, Gnome desktops (and I assume KDE as well) have easy ways to do this graphically. In Gnome, simply right click on the file(s) or folder(s) you’d like to compress, right-click on them, and then choose Compress. You’ll then be asked for the desired name, file type, save location, and password of the compressed result of your selection. It’s quite impressive because of the available options despite the prompt’s overall simplicity.

The Future in Compression

As I mentioned before in my ext4 vs. btrfs article, support for compression within the file system is currently planned for btrfs. For now ext4 is unable to compress data by itself, and requires other programs to do it instead and bundle them in special files. Btrfs will be able to do file compression, both individually as well as for the entire partition, so you should be able to get the most out of your disk space seamlessly. When btrfs is finally used widely, it should be as simple as going into the file’s, folder’s, or partition’s properties and enable compression.

Conclusion

While compression on Linux may not be in the most optimal state right now, there are still plenty of options which should be good enough for plenty of people. Plus with the future stable release of btrfs, you’ll be able to use file system compression in a seamless manner. In any case, you should be able to get the most possible free space with little issues.

Do you compress your files? What is missing when it comes to compression under Linux? What’s your favorite method? Let us know in the comments!

Image Credit: Highlighted Folder Icon via Shutterstock

Join live MakeUseOf Groups on Grouvi App Join live Groups on Grouvi
Master the Linux Command Line
Master the Linux Command Line
35 Members
Best Linux Apps
Best Linux Apps
34 Members
Linux for New Switchers
Linux for New Switchers
33 Members
Linux Distros Talk
Linux Distros Talk
26 Members
Ads by Google
Comments (13)
  • Efi Dreyshner

    I am using 7zip :)

  • eugen9

    i use gzip and peazip for linux and both work fine,i use for usb sticks and emails

  • Alex Livingstone

    Good to know, I dont use Linux much but the more I can learn about it the better. Compressing files/folders is a must when you have so much data.

    • Danny Stieben

      Very true, although I find a good clean-up spree pretty helpful too. :)

  • Tulitanssi

    I compress my folders selectively. Compression is great especially on SSD disk, because currently large SSD disks are still quite expensive.

    • Danny Stieben

      Are there any specific folders you compress that you can tell everyone else about? :)

  • Harry Fyhr

    I’m a Windows user, but I guess my comment still has some relevance. No, I normally wouldn’t compress volumes or folders, for the following reason: The files of any significant size tend to be multimedia files like JPG, MP3, misc. movie formats, and a few other things with one important thing in common: The file format is already compressed so that further compression would make very little difference. If I do have larger files that could be compressed to any significant extent, I would compress them individually, using 7-zip or a similar utility.

    • Danny Stieben

      Compressing them individually? That’s something I haven’t heard many people do…interesting! But your argument makes sense.

Load 10 more
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.
Affiliate Disclamer

This review may contain affiliate links, which pays us a small compensation if you do decide to make a purchase based on our recommendation. Our judgement is in no way biased, and our recommendations are always based on the merits of the items.

For more details, please read our disclosure.