“Curl”的版本间的差异

来自姬鸿昌的知识库
跳到导航 跳到搜索
第15行: 第15行:
 
</syntaxhighlight>
 
</syntaxhighlight>
  
 +
=== 参数说明 ===
 +
-o 和 -O 不是一个意思
 +
 +
-O, --remote-name       Write output to a file named as the remote file
 +
 +
-o, --output <file>      Write to file instead of stdout
  
-o 和 -O 不是一个意思
+
      --output-dir <dir>  Directory to save files in
  
 
-s 和 -sS 不是一个意思
 
-s 和 -sS 不是一个意思

2023年2月2日 (四) 13:18的版本

https://www.ruanyifeng.com/blog/2019/09/curl-reference.html

安装

~ # apk add curl
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.16/community/x86_64/APKINDEX.tar.gz
(1/4) Installing brotli-libs (1.0.9-r6)
(2/4) Installing nghttp2-libs (1.47.0-r0)
(3/4) Installing libcurl (7.83.1-r2)
(4/4) Installing curl (7.83.1-r2)
Executing busybox-1.35.0-r13.trigger
OK: 12 MiB in 21 packages
~ #

参数说明

-o 和 -O 不是一个意思

-O, --remote-name       Write output to a file named as the remote file

-o, --output <file>      Write to file instead of stdout

      --output-dir <dir>  Directory to save files in

-s 和 -sS 不是一个意思

-s/--silent

Silent or quiet mode. Don't show progress meter or error messages. Makes Curl mute.

-S/--show-error

When used with -s it makes curl show an error message if it fails.

参数区分大小写


-L, --location           Follow redirects(3xx)