When extracting files, drop the hierarchical folder structure --strip-components.
Only extract an specific element, just show the contents with -t option and then add the component after the command.
# tar zxvf pack.tar.gz dir1/file.txt
# tar zxvf pack.tar.gz dir1/file.txt --strip-components=1
3万+

被折叠的 条评论
为什么被折叠?



