Hello Drupal Champions,

This is more of untar question, when ever I untar drupal from inside my host it always produce a folder drupal5.x.

How or what parameter should I put in tar so that it will directly unpack the files to my httpdocs directory?

Many thanks :D

Comments

drupalfantwo’s picture

tar -zxvf drupal-5.5.tar.gz

phandy’s picture

you can use this command to untar without the first directory

tar -xvf drupal-6.10.tar.gz --strip 1

so, what I will do will be (say extract drupal to ~/httpdocs/:

> cp drupal-6.10.tar.gz ~/httpdocs/
> cd ~/httpdocs/
> tar -xvf drupal-6.10.tar.gz --strip 1
> rm ~/httpdocs/drupal-6.10.tar.gz

by then all file will be in ~/httpdocs/, including those beginning with "."

ceejayoz’s picture

You can always untar it, then cd into drupal5.x and do mv * ../

drupalfantwo’s picture

thanks a bunch bud! :D

mooffie’s picture

But note that * doesn't match filenames beginning in dot, so it will skip your .htaccess. You'll have to move it explicitly (do mv .h* ..).

ceejayoz’s picture

Good point! Cheers!