How to Unpack a Tarball (.tgz, tar.gz, or tar.bz2)

(0 votes, average 0 out of 5)

Unpacking a tarball through the command line is a simple a matter of memorization.  Here is the command to unpack a .tgz or .tar.gz file:

tar -xzf 

To unpack tar.bz2 files, simply change the z to a j:

tar -xjf 
Upon running one of these commands you should see an extracted version of the directory without the .tar.gz or .tgz extension.
Partner Links:
Last Updated on Monday, 13 February 2012 14:03  
Related Articles

» Find and Replace Text in Multiple Files

Sometimes it is useful to be able to replace a certain piece of text in multiple files, even across multiple folders. Opening each file and using find/replace is tedious. Fortunately, there is a much easier way using the sed and grep utilities. For Windows users, please to get these programs on your system. Linux and Mac OS X users will already have these programs pre-installed.Launch a terminal window, and cd to the root directory where all of these files and folders exist. Once in the...

» Introduction to LaTeX

LaTeX is a self-described document preparation system that is often used for research papers or other technical publications.  It is, in essence, an extremely useful computer language that interprets code and produces a well-formatted document.  It can greatly increase productivity due to the ease of formatting, and other nicities like automatic figure and reference numbering and easy mathematical representation.  Unfortunately, it also have a very steep learning curve. ...

» How to Shutdown or Restart Windows From the Command Line

To shutdown or restart windows from the command line or using a shortcut, you must use the Shutdown.exe program. To use this program, open up a command prompt window. This can be done by navigating to Start -> Run and typing in 'cmd'.Once the command prompt is open, use the following command:shutdown [-i | -l | -s | -r | -a] [-f] [-m computername] [-t xx] [-c "comment"] [-d up:xx:yy]Arguments:  No args Display this message (same as -?)-i Display GUI interface, must be the...