There is a similar question here.
If I understand correctly, the first answer indicates that we cannot extract the contents of a folder, but only a specific file from a folder?
The second answer uses the --directory
option. This looks to be precisely what I want, however this does not extract files from a certain directory within the archive, but instead outputs the files to the directory indicated by the --directory
option.
When I tarred up my folder tar included the entire path from the root directory down. So it has home/ole/folder/thestuff
. I want to extract folder/thestuff
into the current folder that I'm in without including home/ole
.
Thoughts?
mv home/ole/folder .
and thenrmdir home/ole; rmdir home
. – NickD Sep 21 '18 at 18:30home/ole
folder off the path, but I was thinking that there has to be a way to just extract a folder? – Ole Sep 21 '18 at 18:31--directory
option which ended up totally nuking the updated content I had in the original sub folder ... ooops :) – Ole Sep 21 '18 at 18:33