Module Name: src Committed By: lukem Date: Fri Nov 29 05:40:14 UTC 2024
Modified Files: src/usr.bin/ftp: ftp.1 main.c Log Message: ftp: help improvements Document -? as a separate mode. Document -H HEADER in the usage. Clarify units for -b and -x. Consistent argument names between ftp -? and ftp(1). To generate a diff of this commit: cvs rdiff -u -r1.159 -r1.160 src/usr.bin/ftp/ftp.1 cvs rdiff -u -r1.133 -r1.134 src/usr.bin/ftp/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/ftp/ftp.1 diff -u src/usr.bin/ftp/ftp.1:1.159 src/usr.bin/ftp/ftp.1:1.160 --- src/usr.bin/ftp/ftp.1:1.159 Mon Sep 30 19:23:31 2024 +++ src/usr.bin/ftp/ftp.1 Fri Nov 29 05:40:14 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: ftp.1,v 1.159 2024/09/30 19:23:31 kre Exp $ +.\" $NetBSD: ftp.1,v 1.160 2024/11/29 05:40:14 lukem Exp $ .\" .\" Copyright (c) 1996-2024 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -57,7 +57,7 @@ .\" .\" @(#)ftp.1 8.3 (Berkeley) 10/9/94 .\" -.Dd September 30, 2024 +.Dd November 29, 2024 .Dt FTP 1 .Os .Sh NAME @@ -65,7 +65,7 @@ .Nd Internet file transfer program .Sh SYNOPSIS .Nm -.Op Fl 46AadefginpRtVv\&? +.Op Fl 46AadefginpRtVv .Op Fl b Ar bufsize .Op Fl H Ar header .Op Fl N Ar netrc @@ -158,6 +158,8 @@ .Bk -words .Fl u Ar url Ar .Ek +.Nm +.Fl \&? .Sh DESCRIPTION .Nm is the user interface to the Internet standard File Transfer Protocol. @@ -205,7 +207,8 @@ Causes to bypass normal login procedure, and use an anonymous login instead. .It Fl b Ar bufsize Change the input buffer size to -.Ar bufsize . +.Ar bufsize +bytes. The default .Ar bufsize is @@ -300,9 +303,9 @@ Quit if the connection has stalled for seconds. .It Fl R Restart all non-proxied auto-fetches. -.It Fl r Ar wait +.It Fl r Ar retry Retry the connection attempt if it failed, pausing for -.Ar wait +.Ar retry seconds. .It Fl s Ar srcaddr Uses @@ -358,7 +361,8 @@ to show all responses from the remote se as report on data transfer statistics. .It Fl x Ar xfersize Set the size of the socket send and receive buffers to -.Ar xfersize . +.Ar xfersize +bytes. Refer to .Ic xferbuf for more information. Index: src/usr.bin/ftp/main.c diff -u src/usr.bin/ftp/main.c:1.133 src/usr.bin/ftp/main.c:1.134 --- src/usr.bin/ftp/main.c:1.133 Mon Sep 30 13:03:37 2024 +++ src/usr.bin/ftp/main.c Fri Nov 29 05:40:14 2024 @@ -1,7 +1,7 @@ -/* $NetBSD: main.c,v 1.133 2024/09/30 13:03:37 christos Exp $ */ +/* $NetBSD: main.c,v 1.134 2024/11/29 05:40:14 lukem Exp $ */ /*- - * Copyright (c) 1996-2023 The NetBSD Foundation, Inc. + * Copyright (c) 1996-2024 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation @@ -98,7 +98,7 @@ __COPYRIGHT("@(#) Copyright (c) 1985, 19 #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 10/9/94"; #else -__RCSID("$NetBSD: main.c,v 1.133 2024/09/30 13:03:37 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.134 2024/11/29 05:40:14 lukem Exp $"); #endif #endif /* not lint */ @@ -1080,8 +1080,8 @@ synopsis(FILE * stream) const char * progname = getprogname(); fprintf(stream, -"usage: %s [-46AadefginpRtVv] [-H HEADER] [-N NETRC] [-o OUTPUT] [-P PORT]\n" -" [-q QUITTIME] [-r RETRY] [-s SRCADDR] [-T DIR,MAX[,INC]]\n" +"usage: %s [-46AadefginpRtVv] [-b BUFSIZE] [-H HEADER] [-N NETRC] [-o OUTPUT]\n" +" [-P PORT] [-q QUITTIME] [-r RETRY] [-s SRCADDR] [-T DIR,MAX[,INC]]\n" " [-x XFERSIZE]\n" " [[USER@]HOST [PORT]]\n" " [[USER@]HOST:[PATH][/]]\n" @@ -1107,11 +1107,13 @@ usage_help(void) " -6 Only use IPv6 addresses\n" " -A Force active mode\n" " -a Use anonymous login\n" -" -b BUFLEN Use BUFLEN bytes for fetch buffer\n" +" -b BUFSIZE Use BUFSIZE bytes for fetch buffer\n" " -d Enable debugging\n" " -e Disable command-line editing\n" " -f Force cache reload for FTP or HTTP proxy transfers\n" " -g Disable file name globbing\n" +" -H HEADER Add custom HTTP header HEADER for HTTP transfers;\n" +" may be repeated for additional headers\n" " -i Disable interactive prompt during multiple file transfers\n" " -N NETRC Use NETRC instead of ~/.netrc\n" " -n Disable auto-login\n" @@ -1121,15 +1123,15 @@ usage_help(void) " -q QUITTIME Quit if connection stalls for QUITTIME seconds\n" " -R Restart non-proxy auto-fetch\n" " -r RETRY Retry failed connection attempts after RETRY seconds\n" -" -s SRCADDR Use source address SRCADDR\n" +" -s SRCADDR Use IP source address SRCADDR\n" " -t Enable packet tracing\n" " -T DIR,MAX[,INC]\n" -" Set maximum transfer rate for direction DIR to MAX bytes/s,\n" -" with optional increment INC bytes/s\n" +" Set maximum transfer rate for direction DIR (all, get, or put)\n" +" to MAX bytes/s, with optional increment INC bytes/s\n" " -u URL URL to upload file arguments to\n" " -V Disable verbose and progress\n" " -v Enable verbose and progress\n" -" -x XFERSIZE Set socket send and receive size to XFERSIZE\n" +" -x XFERSIZE Set socket send and receive size to XFERSIZE bytes\n" " -? Display this help and exit\n" ); #endif