curl
curl
code:memo
-L, --remote-name
Write output to a local file named like the remote file we get.
-O, -location
(HTTP/HTTPS) If the server reports that the requested page has moved to …
-s, --silent
(Silent or quiet mode. Don't show progress meter or error messages.)
code:memo
# ファイルとしてDL
# -o , --output: 出力ファイル指定
curl -o file.pdf https://your-domain-name/long-file-name.pdf
# 301リダイレクトに対応しつつDL
# -L: URLのリダイレクト対応
curl -L -o file.tgz http://www.cyberciti.biz/long.file.name.tgz
# -O, --remote-name: ファイルへの保存
curl -L -O https://go.dev/dl/go1.19.1.linux-amd64.tar.gz
Error
curl: (56) Recv failure: Connection reset by peer
How to download a file with curl on Linux/Unix command line - nixCraft
☆curlの使い方
#shell