ewhisper 发表于 2005-6-29 13:43:49

tar -xvf - 最后一个-不解

gzip -d -c 520005.tar.gz | tar -xvf -
最后一个-什么意思?:(
还想问问set命令的参数都有哪些?

sixroom 发表于 2005-6-29 16:33:24

"-" 要解的包来自标准输入,而不是普通文件

ewhisper 发表于 2005-6-29 16:59:41

哪里能查到这个解释?我还是不太明白

ewhisper 发表于 2005-6-29 16:59:59

哪里能查到这个解释?我还是不太明白

ewhisper 发表于 2005-6-29 17:15:13

能不能举几个例子

sixroom 发表于 2005-6-29 21:59:50

平常不是 tar -xf file吗,tar打开file从中得到数据流并处理然后输出;
tar -xf - 就是从标准输入得到数据流并处理然后输出。

你给的那个命令gzip不是利用“-c”选项将解压后的数据通过管道送给了tar,tar把它当作标准输入操作。

看看man page

yang119345 发表于 2005-7-5 09:30:30

|是管道,呵呵,楼上说的很清楚了。实在不 明白,google下吧。有很多

zhy2111314 发表于 2005-7-6 09:24:32

man gzip
-c --stdout --to-stdout
            Writeoutputonstandardoutput;keep original
            files unchanged.If there are several input files,
            theoutput consists of a sequence of independently
            compressed members. To obtainbettercompression,
            concatenateallinputfilesbeforecompressing
            them.

ewhisper 发表于 2005-7-6 11:35:11

各位,我想知道'-从标准输入得到数据流并处理然后输出'的用法哪里能找到
还有没有别的例子

ccsu 发表于 2005-11-20 12:44:34

管道。
页: [1]
查看完整版本: tar -xvf - 最后一个-不解