Re: How can I just get the output name?
Dan Fandrich via curl-users <[email protected]>
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On Tue, Mar 26, 2024 at 11:08:01AM -0600, Paul Gilmartin via curl-users wrote:
> On 3/26/24 10:10:57, Dan Fandrich via curl-users wrote:
> >
> > This will do it:
> >
> > curl -sI -o /dev/null --write-out '%header{content-disposition}\n' \
> > https://dl.duosecurity.com/duo-win-login-latest.exe | \
> > sed -e 's/^.*="//' -e 's/".*$//'
> >
> > This requests only the headers from the site and writes out just the
> > Content-Disposition: header, ...
> > .
> Does that transfer and discard the entire payload, thus spending
> time and bandwidth?
"This requests only the headers", not the payload. You can run
"curl -sIv https://dl.duosecurity.com/duo-win-login-latest.exe" to see
everything transferred.
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette: https://curl.se/mail/etiquette.html