tar 只解压tar包中某个文件

sh-4.1# ls
test.tar
sh-4.1# tar -tf test.tar
./ecs20161207.png
./ecs.png
./ecs.xml
./rds.png
./Screenshot-.png
./Screenshot.png
./TMP/
./TMP/Screenshot-.png
./TMP/--.xlsx
./TMP/elk2.png
./TMP/Screenshot.png
./TMP/img003.png
./TMP/ELK.txt
./TMP/win7开启NFS功能报错.png
./TMP/Diagram1.dia.autosave
./TMP/Screenshot-.png
./TMP/Screenshot-.png
./TMP/.png.gif
./TMP/nginx_hosts.config
./TMP/img002.png
./TMP/367_022_6be.jpg
./TMP/.png
./TMP/.jpg
./TMP/Screenshot-.png
./TMP/ELK.png
./TMP/Screenshot-.png
./TMP/k.txt
./TMP/img005.png
./TMP/.png
./TMP/img004.png
./TMP/Screenshot-.png
./TMP/20151229094001_642.png
./TMP/Screenshot-.png
./TMP/haproxy.cng
./TMP/nfs.bat
./TMP/lADOdXWNqc0FNs0C7g_750_1334.jpg_620x10000q90g.jpg
./TMP/teamviewer.png
./TMP/Screenshot-.png
./TMP/ftp无法豋录.png
./TMP/Screenshot-.png
./TMP/d.png
./TMP/nfs_nb.bat
./TMP/Screenshot-.png
./TMP/tcping.png
./Untitled .odt
#查看tar文件所列出的文件

解压tar包中的./TMP/d.png文件

sh-4.1# tar -xvf test.tar ./TMP/d.png
./TMP/d.png
sh-4.1# ls
test.tar TMP
sh-4.1# tree TMP/
TMP/
└── d.png directories, file
上一篇:WPF QuickStart系列之附加属性(Attached Property)


下一篇:[ZZ] MATLAB中Legend的一些控制方法