How to extract a subdirectory in tarball to the current directory?
Example tarball from wordpress :
wordpress/ wordpress/wp-trackback.php wordpress/wp-config-sample.php wordpress/wp-settings.php wordpress/wp-rss2.php wordpress/readme.html wordpress/index.php ...
How to extract everything in wordpress/ to the current directory? In other words, it will not create the wordpress directory.
I tried this with no luck:
tar xvfz latest.tar.gz wordpress -C ./
I know that I can retrieve it normally and move it back, but I suppose there should be a way to do this in one shot.
command-line unix tar
Cory R. King May 10 '09 at 16:14 2009-05-10 16:14
source share