1LWP-DOWNLOAD(1)       User Contributed Perl Documentation      LWP-DOWNLOAD(1)
2
3
4

NAME

6       lwp-download - Fetch large files from the web
7

SYNOPSIS

9        lwp-download [-a] [-s] <url> [<local path>]
10
11        Options:
12
13          -a   save the file in ASCII mode
14          -s   use HTTP headers to guess output filename
15

DESCRIPTION

17       The lwp-download program will save the file at url to a local file.
18
19       If local path is not specified, then the current directory is assumed.
20
21       If local path is a directory, then the last segment of the path of the
22       url is appended to form a local filename.  If the url path ends with
23       slash the name "index" is used.  With the -s option pick up the last
24       segment of the filename from server provided sources like the Content-
25       Disposition header or any redirect URLs.  A file extension to match the
26       server reported Content-Type might also be appended.  If a file with
27       the produced filename already exists, then lwp-download will prompt
28       before it overwrites and will fail if its standard input is not a
29       terminal.  This form of invocation will also fail is no acceptable
30       filename can be derived from the sources mentioned above.
31
32       If local path is not a directory, then it is simply used as the path to
33       save into.  If the file already exists it's overwritten.
34
35       The lwp-download program is implemented using the libwww-perl library.
36       It is better suited to down load big files than the lwp-request program
37       because it does not store the file in memory.  Another benefit is that
38       it will keep you updated about its progress and that you don't have
39       much options to worry about.
40
41       Use the "-a" option to save the file in text (ASCII) mode.  Might make
42       a difference on DOSish systems.
43

EXAMPLE

45       Fetch the newest and greatest perl version:
46
47        $ lwp-download http://www.perl.com/CPAN/src/latest.tar.gz
48        Saving to 'latest.tar.gz'...
49        11.4 MB received in 8 seconds (1.43 MB/sec)
50

AUTHOR

52       Gisle Aas <gisle@aas.no>
53
54
55
56perl v5.36.0                      2022-07-22                   LWP-DOWNLOAD(1)
Impressum