diff --git a/docs/curl.html b/docs/curl.html index 1011c886..dc6c15cb 100644 --- a/docs/curl.html +++ b/docs/curl.html @@ -228,6 +228,38 @@
curl -o /dev/null --silent -Iw "%{http_code}" https://example.com/my.remote.tarball.gz
+curl https://example.com | \
+grep --only-matching 'src="[^"]*.[png]"' | \
+cut -d\" -f2 | \
+while read i; do curl https://example.com/"${i}" \
+-o "${i##*/}"; done
+
+从站点下载所有 PNG 文件(使用GNU grep)
+curl --remote-name "https://example.com/linux-distro.iso"
+
+重命名文件
+curl --remote-name "http://example.com/index.html" --output foo.html
+
+curl --remote-name --continue-at - "https://example.com/linux-distro.iso"
+
+
+curl "https://www.{example,w3,iana}.org/index.html" --output "file_#1.html"
+
+
+curl "https://{foo,bar}.com/file_[1-4].webp" --output "#1_#2.webp"
+
+
+下载一系列文件(输出foo_file1.webp
、foo_file2.webp…bar_file1_webp
等)