|
楼主 |
发表于 2005-11-17 23:23:46
|
显示全部楼层
Post by ys_freedom
请问能否用tar命令行解压包中特定文件名的文件?
[php]
colinux:~/test# ls
test.tar
colinux:~/test# tar -tvf test.tar
drwxr-xr-x root/root 0 2005-11-17 10:13:37 ./
-rw-r--r-- root/root 16 2005-11-17 10:12:55 ./test2
-rwxr-xr-x root/root 89 2005-11-10 03:23:37 ./test.sh
colinux:~/test# tar --get -vf test.tar test.sh
tar: test.sh: Not found in archive
tar: Error exit delayed from previous errors
colinux:~/test# tar --get -vf test.tar ./test.sh
./test.sh
colinux:~/test# ls -l
total 16
-rwxr-xr-x 1 root root 89 Nov 10 03:23 test.sh
-rw-r--r-- 1 root root 10240 Nov 17 10:13 test.tar
[/php] |
|