How do i use the curl command to download a file?



  • curl has a number of uses, one of them is to download remote files using URL's.

    The -o tells curl to use the name specificed, normally it just uses the one from the URL. The uppercase -L means the location. Without the -O or -o option curl will mess up you screen, as it outputs to default standard out.

    $ curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   264  100   264    0     0    546      0 --:--:-- --:--:-- --:--:--   546
    100  238k  100  238k    0     0   163k      0  0:00:01  0:00:01 --:--:--  321k
    

Log in to reply
 

© Lightnetics 2024