Search this site

Wednesday, March 14, 2012

How to Compress and Decompress files in Linux? Zip/rar or 7-zip?To decompress/unrar a .rar file?

Almost in all Linux distributions, GUI based Archive Manager/Roller is available for Compressing and Decompressing files. All you need is to just select the file, right click  and choose Compress or Extract.

7-zip format provides  best compression, but may be slow for large files. By default, it may not be available with Archive Manager/RollerFor using password protection install 'p7zip-full':
 Open terminal ad type command:

$sudo apt-get install p7zip-full

After installation you will not find any command line p7zip-full, but it gets added in 'Compression' menu of file selection:

 You can also set a password: 

To decompress/unrar a .rar file

You can install "unrar-free" utility:
 sudo apt-get install unrar-free

Now, to decompress a .rar file, for example: myfile.rar located at "/home/user/Desktop/":

sudo unrar e /home/user/Desktop/myfile.rar

No comments:

Post a Comment