LWP-DOWNLOAD(1)
π lwp-download β the "grab big files off the web" girlie π
okay so this is lwp-download, one of the Perl man pages (User Contributed Perl Documentation, periodt) and honestly? she's the low-key MVP of fetching huge files off the internet. bestie, let's get into it π«Ά
β¨ SYNOPSIS β¨
lwp-download [-a] [-s] <url> [<local path>]
Options, in cute little list form:
-aβ save the file in ASCII mode-sβ use HTTP headers to guess output filename
πΈ DESCRIPTION πΈ
The lwp-download program will save the file at url to a local file. that's the whole job, and she does it well π
If local path is not specified, then the current directory is assumed. she just drops it right where you're standing, no big deal β¨
If local path is a directory, then the last segment of the path of the url is appended to form a local filename. If the url path ends with slash the name "index" is used. With the -s option pick up the last segment of the filename from server provided sources like the Content-Disposition header or any redirect URLs. A file extension to match the server reported Content-Type might also be appended. If a file with the produced filename already exists, then lwp-download will prompt before it overwrites and will fail if its standard input is not a terminal. This form of invocation will also fail is no acceptable filename can be derived from the sources mentioned above.
ok genuine heads up on that last part: if she can't work out a filename from any of those sources, she just fails. no vibes-based guessing. and if she needs to ask you about overwriting but stdin isn't a terminal? also fails. π
If local path is not a directory, then it is simply used as the path to save into. If the file already exists it's overwritten. yeah. no prompt. just gone. main character energy, honestly π
The lwp-download program is implemented using the libwww-perl library. It is better suited to down load big files than the lwp-request program because it does not store the file in memory. Another benefit is that it will keep you updated about its progress and that you don't have much options to worry about. literally so chill, so few decisions, obsessed π
Use the -a option to save the file in text (ASCII) mode. Might make a difference on DOSish systems. iykyk π
β EXAMPLE β
Fetch the newest and greatest perl version, iconic behaviour tbh:
$ lwp-download http://www.perl.com/CPAN/src/latest.tar.gz
Saving to 'latest.tar.gz'...
11.4 MB received in 8 seconds (1.43 MB/sec)
look at her go. progress updates AND speed reporting? she ate π₯
π AUTHOR π
Gisle Aas <gisle@aas.no> β thank you for this one, king π«Ά
and that's the whole page, bestie! sign-off time: this little gem ships with perl v5.42.0, dated 2026-05-18, and it lives in the User Contributed Perl Documentation section of the manual. go download something enormous, you've earned it ππ¦πΈ
π¦ where this page comes from
- opensuse-leap 16.0: perl-libwww-perl 6.770.0-160000.3.1 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms