Bash tip: Extracting content from compressed files without the hassle

If you work with file archives that come in many different “flavors”, you might find this little trick to be a handy one. Add a function to your .bash_profile that runs the proper extraction command based on the file’s extension(s). This will keep you from ever having to scratch your head to make sure you’re selecting the right options for any of these commands. Add a “v” (for verbose) to the tar commands in the list if you want to see the files listed as they are being extracted.

See the script after the jump.

http://www.itworld.com/article/2895888/extracting-content-without-the-hassle.html

Tagged with: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.