Jason McIntyre (2019-06-17 15:02 +0200): > On Mon, Jun 17, 2019 at 02:47:09PM +0200, Tim van der Molen wrote: > > sftp(1) has this: > > > > reput [-Ppr] [local-path] remote-path > > Resume upload of [local-path]. Equivalent to put with the -a > > flag set. > > > > remote-path should be marked optional, not local-path. Probably a pasto > > from reget. > > > > OK? > > > > hi. > > ok by me, but i have another question - shouldn;t the usage for reput > and reget show the -f flag too? i know it's unrelated to your diff, but > two birds and all that.
Yes, you're right. I see there's also a -R flag (equivalent to -r), so I added that one as well (it's also listed in sftp's help command). And then I noticed the help command also has the original issue. While there I might as well restore alphabetical order. (It's not two birds, but a can of worms!) Index: sftp.1 =================================================================== RCS file: /cvs/src/usr.bin/ssh/sftp.1,v retrieving revision 1.125 diff -p -u -r1.125 sftp.1 --- sftp.1 22 Jan 2019 06:58:31 -0000 1.125 +++ sftp.1 17 Jun 2019 15:27:11 -0000 @@ -404,7 +404,7 @@ extension. Quit .Nm sftp . .It Xo Ic get -.Op Fl afPpr +.Op Fl afPpRr .Ar remote-path .Op Ar local-path .Xc @@ -446,9 +446,11 @@ or flag is specified, then full file permissions and access times are copied too. .Pp -If the +If either the +.Fl R +or .Fl r -flag is specified then directories will be copied recursively. +flag is specified, then directories will be copied recursively. Note that .Nm does not follow symbolic links when performing recursive transfers. @@ -545,7 +547,7 @@ Create remote directory specified by .It Ic progress Toggle display of progress meter. .It Xo Ic put -.Op Fl afPpr +.Op Fl afPpRr .Ar local-path .Op Ar remote-path .Xc @@ -588,9 +590,11 @@ or flag is specified, then full file permissions and access times are copied too. .Pp -If the +If either the +.Fl R +or .Fl r -flag is specified then directories will be copied recursively. +flag is specified, then directories will be copied recursively. Note that .Nm does not follow symbolic links when performing recursive transfers. @@ -600,7 +604,7 @@ Display remote working directory. Quit .Nm sftp . .It Xo Ic reget -.Op Fl Ppr +.Op Fl fPpRr .Ar remote-path .Op Ar local-path .Xc @@ -612,12 +616,12 @@ with the .Fl a flag set. .It Xo Ic reput -.Op Fl Ppr -.Op Ar local-path -.Ar remote-path +.Op Fl fPpRr +.Ar local-path +.Op Ar remote-path .Xc Resume upload of -.Op Ar local-path . +.Ar local-path . Equivalent to .Ic put with the Index: sftp.c =================================================================== RCS file: /cvs/src/usr.bin/ssh/sftp.c,v retrieving revision 1.192 diff -p -u -r1.192 sftp.c --- sftp.c 7 Jun 2019 03:47:12 -0000 1.192 +++ sftp.c 17 Jun 2019 15:27:11 -0000 @@ -263,8 +263,6 @@ help(void) " 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" "help Display this help text\n" "lcd path Change local directory to 'path'\n" "lls [ls-options [path]] Display local directory listing\n" @@ -278,6 +276,8 @@ help(void) "put [-afPpRr] local [remote] Upload file\n" "pwd Display remote working directory\n" "quit Quit sftp\n" + "reget [-fPpRr] remote [local] Resume download file\n" + "reput [-fPpRr] local [remote] Resume upload file\n" "rename oldpath newpath Rename remote file\n" "rm path Delete remote file\n" "rmdir path Remove remote directory\n"