summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2019-06-19 20:12:45 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2019-06-19 20:12:45 +0000
commit061376ed714572fb004a18fb4294047ebbf2d6c9 (patch)
tree91d672efb005647eee1744530cd67d63a1a49be2 /usr.bin
parentb7b51984616027c6776f4b2249f7fa484d90720c (diff)
from tim:
- for reput, it is remote-path which is optional, not local-path - sync help from deraadt: - prefer -R and undocument -r (but add a comment for future editors) from schwarze: - prefer -p and undocument -P (as above. the comment was schwarze's too) more: - add the -f flag to reput and reget - sort help (i can;t remember who suggested this originally) djm and deraadt were ok with earlier versions of this; tim and schwarze ok
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/sftp.142
-rw-r--r--usr.bin/ssh/sftp.c10
2 files changed, 30 insertions, 22 deletions
diff --git a/usr.bin/ssh/sftp.1 b/usr.bin/ssh/sftp.1
index 4554ae4f3d0..a52c1cff3a7 100644
--- a/usr.bin/ssh/sftp.1
+++ b/usr.bin/ssh/sftp.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sftp.1,v 1.126 2019/06/12 11:31:50 jmc Exp $
+.\" $OpenBSD: sftp.1,v 1.127 2019/06/19 20:12:44 jmc Exp $
.\"
.\" Copyright (c) 2001 Damien Miller. All rights reserved.
.\"
@@ -22,7 +22,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: June 12 2019 $
+.Dd $Mdocdate: June 19 2019 $
.Dt SFTP 1
.Os
.Sh NAME
@@ -404,7 +404,7 @@ extension.
Quit
.Nm sftp .
.It Xo Ic get
-.Op Fl afPpr
+.Op Fl afpR
.Ar remote-path
.Op Ar local-path
.Xc
@@ -439,15 +439,19 @@ flag is specified, then
will be called after the file transfer has completed to flush the file
to disk.
.Pp
-If either the
-.Fl P
-or
+If the
.Fl p
+.\" undocumented redundant alias
+.\" or
+.\" .Fl P
flag is specified, then full file permissions and access times are
copied too.
.Pp
If the
-.Fl r
+.Fl R
+.\" undocumented redundant alias
+.\" or
+.\" .Fl r
flag is specified then directories will be copied recursively.
Note that
.Nm
@@ -545,7 +549,7 @@ Create remote directory specified by
.It Ic progress
Toggle display of progress meter.
.It Xo Ic put
-.Op Fl afPpr
+.Op Fl afpR
.Ar local-path
.Op Ar remote-path
.Xc
@@ -581,15 +585,19 @@ after the file has been transferred.
Note that this is only supported by servers that implement
the "fsync@openssh.com" extension.
.Pp
-If either the
-.Fl P
-or
+If the
.Fl p
+.\" undocumented redundant alias
+.\" or
+.\" .Fl P
flag is specified, then full file permissions and access times are
copied too.
.Pp
If the
-.Fl r
+.Fl R
+.\" undocumented redundant alias
+.\" or
+.\" .Fl r
flag is specified then directories will be copied recursively.
Note that
.Nm
@@ -600,7 +608,7 @@ Display remote working directory.
Quit
.Nm sftp .
.It Xo Ic reget
-.Op Fl Ppr
+.Op Fl fpR
.Ar remote-path
.Op Ar local-path
.Xc
@@ -612,12 +620,12 @@ with the
.Fl a
flag set.
.It Xo Ic reput
-.Op Fl Ppr
-.Op Ar local-path
-.Ar remote-path
+.Op Fl fpR
+.Ar local-path
+.Op Ar remote-path
.Xc
Resume upload of
-.Op Ar local-path .
+.Ar local-path .
Equivalent to
.Ic put
with the
diff --git a/usr.bin/ssh/sftp.c b/usr.bin/ssh/sftp.c
index b81055f6275..18f1ec0106b 100644
--- a/usr.bin/ssh/sftp.c
+++ b/usr.bin/ssh/sftp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp.c,v 1.192 2019/06/07 03:47:12 dtucker Exp $ */
+/* $OpenBSD: sftp.c,v 1.193 2019/06/19 20:12:44 jmc Exp $ */
/*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
*
@@ -262,9 +262,7 @@ help(void)
"df [-hi] [path] Display statistics for current directory or\n"
" filesystem containing 'path'\n"
"exit Quit sftp\n"
- "get [-afPpRr] remote [local] Download file\n"
- "reget [-fPpRr] remote [local] Resume download file\n"
- "reput [-fPpRr] [local] remote Resume upload file\n"
+ "get [-afpR] remote [local] Download file\n"
"help Display this help text\n"
"lcd path Change local directory to 'path'\n"
"lls [ls-options [path]] Display local directory listing\n"
@@ -275,10 +273,12 @@ help(void)
"lumask umask Set local umask to 'umask'\n"
"mkdir path Create remote directory\n"
"progress Toggle display of progress meter\n"
- "put [-afPpRr] local [remote] Upload file\n"
+ "put [-afpR] local [remote] Upload file\n"
"pwd Display remote working directory\n"
"quit Quit sftp\n"
+ "reget [-fpR] remote [local] Resume download file\n"
"rename oldpath newpath Rename remote file\n"
+ "reput [-fpR] local [remote] Resume upload file\n"
"rm path Delete remote file\n"
"rmdir path Remove remote directory\n"
"symlink oldpath newpath Symlink remote file\n"