Curl fsSL Command meaning

Hi,

I am started Dockers for Absolute beginners, Can you please tell me what does fsSL stands for in this command?

$ curl -fsSL https://get.docker.com -o get-docker.sh

I can understand the concept that we are calling it to download the file name get-docker.sh from that weblink via Curl command, but fsSL is confusing me

2 Likes

From #man curl, these are options you can use with the curl command:

   -f, --fail
          (HTTP) Fail silently (no output at all) on server errors. This is
          mostly done to enable scripts etc to better deal with failed
          attempts. In normal cases when an HTTP server fails to deliver a
          document, it returns an HTML document stating so (which often also
          describes why and more). This flag will prevent curl from
          outputting that and return error 22.

          This method is not fail-safe and there are occasions where non-
          successful response codes will slip through, especially when
          authentication is involved (response codes 401 and 407).

          See also --fail-with-body.


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

          See also --no-progress-meter.

   -s, --silent
          Silent or quiet mode. Don't show progress meter or error messages.
          Makes Curl mute. It will still output the data you ask for,
          potentially even to the terminal/stdout unless you redirect it.

          Use -S, --show-error in addition to this option to disable
          progress meter but still show error messages.

          See also -v, --verbose, --stderr and --no-progress-meter.

   -L, --location
          (HTTP) If the server reports that the requested page has moved to
          a different location (indicated with a Location: header and a 3XX
          response code), this option will make curl redo the request on the
          new place. If used together with -i, --include or -I, --head,
          headers from all requested pages will be shown. When
          authentication is used, curl only sends its credentials to the
          initial host. If a redirect takes curl to a different host, it
          won't be able to intercept the user+password. See also --location-
          trusted on how to change this. You can limit the amount of
          redirects to follow by using the --max-redirs option.

          When curl follows a redirect and if the request is a POST, it will
          do the following request with a GET if the HTTP response was 301,
          302, or 303. If the response code was any other 3xx code, curl
          will re-send the following request using the same unmodified
          method.

          You can tell curl to not change POST requests to GET after a 30x
          response by using the dedicated options for that: --post301,
          --post302 and --post303.

Thanks for asking the question, now I know what they do too!