当前位置:网站首页>Curl command – file transfer tool

Curl command – file transfer tool

2022-06-25 05:59:00 ProYuan28

curl Command is a use of URL The rules in shell Terminal command line working under the file transfer tool ; It supports file upload and download , So it's the integrated transport tool , But by tradition , Customary term curl For download tools .

As a powerful tool ,curl Support includes HTTP、HTTPS、ftp And so many agreements , And support POST、cookies、 authentication 、 Download some files from the specified offset 、 User agent string 、 The speed limit 、 file size 、 Progress bar and so on ; Do web page processing and data retrieval Automation .

Grammar format :curl [ Parameters ] [ website ]

Common parameters :

-O Write the output to this file , Keep the filename of the remote file
-u Access is authorized through the user name and password configured on the server

Reference examples

Write the downloaded data to a file , The absolute address of the file must be used :

[[email protected] ~]# curl https://www.linuxcool.com/abc.txt --silent -O

When accessing a page that requires authorization , It can be done by -u Options provide user name and password for authorization :

[[email protected] ~]# curl -u root https://www.linuxprobe.com/
 Enter host password for user 'root':
原网站

版权声明
本文为[ProYuan28]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202201251057235.html