Playing with Debian

Sunday, 9th March 2008 at 04:36pm

Extracting archived files from the command line

As an example yesterday, I told you how to download the WordPress installation stuff. So, I might as well tell you how to untar (or, unzip?) it! It's simple really.

Go to the directory you want to unzip it to...

cd /var/www/wordpress/

And then unzip it...

tar xfz /home/shamess/downloads/latest.tar.gz

Here's what those options do...

x

Tells tar to extract it, rather than archive something

f

Tells tar that you're giving it an archived file

z

Tells tar that it's also a gunzipped (.gz) file.

Some people like to add v too, which shows you a list of the files as it unzips them.

Comments

Your name: Your URL:

Body:

User comments

Marc says:

'Untar' is correct. Or just 'extract'. You 'unzip' a zip archive which is generally a Windows thing.

Ober says:

And it's actually a gzipped file, which you unpack with gunzip.

shamess says:

Oh, thanks, Ober. ^^

Read some previous entries