Painless file extraction on Linux
Extracting files from archives in Linux systems is considerably less painful than tooth extraction, but sometimes seems more complicated. In this post, we will take a look at how you can easily extract files from just about any kind of archive you’re likely to run into on a Linux system.
There’s a pile of them – everything from .gz to .tbz2 files with some variations for how those files are named. Sure, you can memorize all of the various commands available for extracting files from archives along with the options they offer, but you can also just deposit all that know-how into a script and stop worrying about the details.
In this post, we assemble a series of extraction commands into a script that calls the proper command to extract the content of file archives depending on the archive file names. The script starts with some commands to verify that a file name has been provided as an argument or ask that the person running the script provide one.
Source:: Network World – Linux