日期:2014-05-16  浏览次数:20699 次

关于tar命令的v选项
各位,为什么tar命令的v选项的位置不一样,执行的结果会不同呢?详细如下:

[root@localhost yan]# tar -vtf pack.tar.gz
-rw-r--r-- root/root 0 2012-07-03 18:30 a.txt
-rw-r--r-- root/root 0 2012-07-03 18:30 b.txt
-rw-r--r-- root/root 0 2012-07-03 18:30 c.txt
-rw-r--r-- root/root 0 2012-07-03 18:31 d.txt

[root@localhost yan]# tar -tfv pack.tar.gz
tar: v: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now

------解决方案--------------------
不是v的问题,是f的问题,-f后面要跟文件名