Reputation: 1385
Let's say I have a tar archive with the following structure:
"NAME/FOLDER/FILES"
e.g.
tarfolder.tar.gz/test123/[file1,file2,filex]
Now I wan't to extract all files from the folder test123 without extracting the "test123" folder itself. What's the command to do so?
Upvotes: 2
Views: 2140
Reputation: 2003
Try:
tar -zxfv tarfolder.tar.gz test123/ --strip-components=1
Works for me.
Upvotes: 3
Reputation: 1262
Use the tar zxvf option, like this:
tar -zxvf tarfolder.tar.gz test123/file1
Upvotes: 0