Download, extract and move a tar.gz file

Downloading some script or application using WGET is a common an quick way to start some web application or website. In my case I can’t remember me parameters I don’t use very often.

For example we like to install WordPress right into our public_html directory (not into a sub-directory), move to the website’s root directory first:

# cd /home/username/public_html/

Download the application from the WordPress website:

# wget

Extract the cabinet file using the “tar” command:

# tar xvfz latest.tar.gz

Note that your will find a directory called “wordpress” in your website root directory. Now we need to move the files from the WordPress directory into the public_html directory:

# mv /home/username/public_html/wordpress/* /home/username/public_html

Clean-up the un-used files and directories:

# rm latest.tar.gz
# rm -R wordpress

That was a very basic tutorial, but I’m sure I will remember me these steps the next time. ;)