I have the Wordpress tar, latest.tar.gz. Within it is the following structure /wordpress/dirtories/files
When I do the following command I would prefer if I could have it unpack starting at /directories/ and not /wordpress with the goal of installing wordpress in the root of my html directory.
tar -xzvf latest.tar.gz
Is this possible?
UPDATE
Sorry, the tar contains /wordpress/[Directories] and I want all the directories in [Directories] extracted to the current directory. Sorry for misleading you all.
To strip down the parent directory:
If you want to be sure that nothing from the parent directory is extracted:
Edit:
--strip
(--strip-path
or--strip-components
) was introduced in tar 1.14.tar xvzf file.tar.gz -C /extract/point/
will extract all the subdirectories (and files) of the wordpress folder into the current directory by creating a wordpress subdirectory. One way to "fool" the extraction by doing
and then running the tar extraction. The result will create each subfolder in the current folder because you linked the wordpress directory to the current directory.
Afterwards you can remove the wordpress symbolic link as it is no longer needed.