Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to untar a package from one directory to another directory, directly from the command prompt. I want to untar the joomla package into the htdocs directory of xampp. How to do that directly from command prompt ? The reason i am asking this is if I try the "drag and drop" way, it won't be possible as xampp is stored in /opt directory and without super-user authentication nothing can be saved into it. You can argue saying that why did I untar xampp initially in su mode ,but that had to be done so that apache doesnt give me any start-up problems.

share|improve this question

migrated from Jul 19 '10 at 12:22

This question came from our site for professional and enthusiast programmers.

unpack tar.gz:

tar zxvf tarball.tar.gz -C destination_dir

unpack tar.bz2:

tar jxvf tarball.tar.bz2 -C destination_dir
share|improve this answer
Learn something new everyday reading answers. – steve.lippert Jul 19 '10 at 13:08
cd targetdir
tar xf pathtoarchive/archive.tar
share|improve this answer
This is my preferred method as I typically want to work on those files next. – steve.lippert Jul 19 '10 at 13:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.