diff options
| author | Fernando ApesteguĂa <fernape@FreeBSD.org> | 2020-10-29 18:34:47 +0000 |
|---|---|---|
| committer | Fernando ApesteguĂa <fernape@FreeBSD.org> | 2020-10-29 18:34:47 +0000 |
| commit | 538d212d13153b0578826fbd0df864eab638195b (patch) | |
| tree | ac3a6b4644022dbfca6e009b75720bf7149227c1 /usr.bin/fetch | |
| parent | ad7b26ecdc386b7d660aac53744aeedf2b4ef2b5 (diff) | |
Notes
Diffstat (limited to 'usr.bin/fetch')
| -rw-r--r-- | usr.bin/fetch/fetch.1 | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/usr.bin/fetch/fetch.1 b/usr.bin/fetch/fetch.1 index 85c0491c1ed5..a84f6bdea7ce 100644 --- a/usr.bin/fetch/fetch.1 +++ b/usr.bin/fetch/fetch.1 @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 6, 2018 +.Dd October 29, 2020 .Dt FETCH 1 .Os .Sh NAME @@ -384,6 +384,51 @@ If the argument is used and the remote file is not newer than the specified file then the command will still return success, although no file is transferred. +.Sh EXAMPLES +Silently try to fetch the URLs passed as parameters. +The first one will fail. +If the second URL succeeds the third one will not be tried: +.Bd -literal -offset indent +$ fetch -1 -q https://www.freebsd.org/bad.html \\ + ftp.freebsd.org/pub/FreeBSD/README.TXT \\ + https://www.fake.url +fetch: https://www.freebsd.org/bad.html: Not Found +.Ed +.Pp +Be verbose when retrieving the +.Ql README.TXT +file: +.Bd -literal -offset indent +$ fetch -v ftp.freebsd.org/pub/FreeBSD/README.TXT +resolving server address: ftp.freebsd.org:80 +requesting http://ftp.freebsd.org/pub/FreeBSD/README.TXT +local size / mtime: 4259 / 1431015519 +remote size / mtime: 4259 / 1431015519 +README.TXT 4259 B 44 MBps 00s +.Ed +.Pp +Quietly save the +.Ql README.TXT file as +.Ql myreadme.txt +and do not delete the output file under any circumstances: +.Bd -literal -offset indent +fetch -o myreadme.txt -q -R ftp.freebsd.org/pub/FreeBSD/README.TXT +.Ed +.Pp +Print the size of the requested file and identify the request with a custom user +agent string: +.Bd -literal -offset indent +$ fetch -s ftp.freebsd.org/pub/FreeBSD/README.TXT +--user-agent="Mozilla/5.0 (X11; FreeBSD x86_64; rv:78.0) Gecko/20100101" +3513231 +.Ed +.Pp +Restart the transfer of the +.Ql README.TXT +file and retry the transfer upon soft failures: +.Bd -literal -offset indent +$ fetch -a -r http://ftp.freebsd.org/pub/FreeBSD/README.TXT +.Ed .Sh SEE ALSO .Xr fetch 3 , .Xr phttpget 8 |
