2

I'm not a regular curl user, but from time to time I use it to test something.
So I was writing in command line this:

curl -o:output.html www.google.com

It didn't gave me any error, looked like everything is ok, but output file didn't appeared.
So I've started process monitor and checked what is going on, from the screenshot below I think it is clear what was my problem, but now the question - why all three operations are marked as successful? I've searched for filename through whole disk, but there was no file, create file result was Overwritten, so it looks like it actually somewhere was saved. enter image description here

4

1 回答 1

2

“output.html”是目录(或可能是文件)“C:\demo”的命名流

不幸的是,该copy命令不喜欢流语法,因此您不能使用它将数据复制到常规文件中。你可以使用:

notepad c:\demo:output.html

并将数据保存在别处。

您最初的问题是 curl 语法错误。看起来 curl 不需要冒号,因此它将冒号视为文件名的一部分,导致 Windows 将其解释为流名称。

您可以使用 sysinternals Stream 工具列出命名流。

于 2014-12-11T15:03:44.200 回答