some useful tar options

来源:互联网 发布:双色球大赢家缩水软件 编辑:程序博客网 时间:2024/06/15 07:31

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
0 0
原创粉丝点击