Set extraction directory in tar

Use the -C option to det directory to extract to.

Eg:

tar xvf /root/backups/something.sql.tar.bz2 -C /home/joel/domains/public_html/upload

You are reading this post on Joel G Mathew’s tech blog. Joel's personal blog is the Eyrie, hosted here.