Uncompressing Files in Linux
Is there a single Linux utility that can be used to uncompress files of common formats like .rar, .zip, .z, .gz, .tar, .bz2 etc. instead of different utilities for all of them?
|
The Gnome environment has file-roller, it's a GUI frontend for various archiving utilities. I don't know about CLI front-ends but I'd be surprised if there aren't a few around.
|
Could you please elaborate on the file-roller thing?
Actually, I need to uncompress a few file formats in my software. It runs on a linux server. So, I'd need a utility, like gunzip for .z files and uncompress for .gz files which can handle all the file formats all in one. |
File-roller is a GUI program, you can compare its interface to that of "winzip" or similar graphical programs for dealing with compressed files, it's included by default in the Gnome desktop. What desktop do you use?
|
KDE uses Ark, which is essentially the same thing
|
I am not sure if I am making myself clear. I don't need any GUI. I just need a command line utility (like gunzip) which could uncompress multiple file formats. Right now, I have to use separate utilities for each file format and I want to avoid that.
|
Quote:
Q: Does the machine that you need this for have a GUI, i.e. Gnome installed? If yes, then you could use 'file-roller'. Quote:
Code:
man file-roller Code:
$ file-roller -h /path/to/compressed/file # extract in current directory |
Two more options for you:
unp unar (the package that provides it is called "unarchiver" or similar) |
7zip/p7zip can uncompress them all, although permissions for tar doesn't always work, so it's best to use the tar utility for that.
|
@crts...
Sorry for the delayed reply...but it is now that I finally managed to get the permissions to install file-roller on the server. I gave the command as file-roller -h test.gz But it gave and error.. "cannot open display: Run 'file-roller --help' to see a full list of available command line options." I cannot open any GUI pop-up as this command will be coded in a script. What should I do.? @David I could not find the rpm packages for unp or unar. Can you help me with that? I am using RedHat 5.3. |
Quote:
|
For extracting ZIP:
Code:
unzip file.zip Code:
unrar e file.zip |
For extracting zip, rar, 7z, tar, gz, bz2, cpio, rpm, deb, and others:
Code:
7z x file.??? |
Quote:
Code:
7za x .... |
bsdtar, it won't do rar but will do all the others and several more (e.g. reading iso files)
|
All times are GMT -5. The time now is 09:10 AM. |