[sftp.1 sftp.c]
     update for the synopses displayed by the 'help' command, there are a
     few missing flags; add 'bye' to the output of 'help'; sorting and spacing.
     jmc@ suggested replacing .Oo/.Oc with a single .Op macro.
     ok jmc@
This commit is contained in:
Damien Miller 2009-01-28 16:14:09 +11:00
parent c30def96e2
commit 62fd18a2b7
3 changed files with 42 additions and 35 deletions

View File

@ -8,6 +8,12 @@
- djm@cvs.openbsd.org 2008/12/09 04:32:22 - djm@cvs.openbsd.org 2008/12/09 04:32:22
[auth2-chall.c] [auth2-chall.c]
replace by-hand string building with xasprinf(); ok deraadt@ replace by-hand string building with xasprinf(); ok deraadt@
- sobrado@cvs.openbsd.org 2008/12/09 15:35:00
[sftp.1 sftp.c]
update for the synopses displayed by the 'help' command, there are a
few missing flags; add 'bye' to the output of 'help'; sorting and spacing.
jmc@ suggested replacing .Oo/.Oc with a single .Op macro.
ok jmc@
20090107 20090107
- (djm) [uidswap.c] bz#1412: Support >16 supplemental groups in OS X. - (djm) [uidswap.c] bz#1412: Support >16 supplemental groups in OS X.
@ -5017,5 +5023,5 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@ passwords between UnixWare and OpenServer they will still work. OK dtucker@
$Id: ChangeLog,v 1.5162 2009/01/28 05:13:39 djm Exp $ $Id: ChangeLog,v 1.5163 2009/01/28 05:14:09 djm Exp $

6
sftp.1
View File

@ -1,4 +1,4 @@
.\" $OpenBSD: sftp.1,v 1.68 2008/12/09 03:02:37 djm Exp $ .\" $OpenBSD: sftp.1,v 1.69 2008/12/09 15:35:00 sobrado Exp $
.\" .\"
.\" Copyright (c) 2001 Damien Miller. All rights reserved. .\" Copyright (c) 2001 Damien Miller. All rights reserved.
.\" .\"
@ -48,7 +48,7 @@
.Nm sftp .Nm sftp
.Oo Ar user Ns @ Oc Ns .Oo Ar user Ns @ Oc Ns
.Ar host Ns Oo : Ns Ar dir Ns .Ar host Ns Oo : Ns Ar dir Ns
.Oo Ar / Oc Oc .Op Ar / Oc
.Nm sftp .Nm sftp
.Fl b Ar batchfile .Fl b Ar batchfile
.Oo Ar user Ns @ Oc Ns Ar host .Oo Ar user Ns @ Oc Ns Ar host
@ -441,7 +441,7 @@ to
Display the Display the
.Nm .Nm
protocol version. protocol version.
.It Ic \&! Ar command .It Ic \&! Ns Ar command
Execute Execute
.Ar command .Ar command
in local shell. in local shell.

63
sftp.c
View File

@ -1,4 +1,4 @@
/* $OpenBSD: sftp.c,v 1.105 2008/12/09 03:04:39 djm Exp $ */ /* $OpenBSD: sftp.c,v 1.106 2008/12/09 15:35:00 sobrado Exp $ */
/* /*
* Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org> * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
* *
@ -207,36 +207,37 @@ cmd_interrupt(int signo)
static void static void
help(void) help(void)
{ {
printf("Available commands:\n"); printf("Available commands:\n"
printf("cd path Change remote directory to 'path'\n"); "bye Quit sftp\n"
printf("lcd path Change local directory to 'path'\n"); "cd path Change remote directory to 'path'\n"
printf("chgrp grp path Change group of file 'path' to 'grp'\n"); "chgrp grp path Change group of file 'path' to 'grp'\n"
printf("chmod mode path Change permissions of file 'path' to 'mode'\n"); "chmod mode path Change permissions of file 'path' to 'mode'\n"
printf("chown own path Change owner of file 'path' to 'own'\n"); "chown own path Change owner of file 'path' to 'own'\n"
printf("df [path] Display statistics for current directory or\n"); "df [-hi] [path] Display statistics for current directory or\n"
printf(" filesystem containing 'path'\n"); " filesystem containing 'path'\n"
printf("help Display this help text\n"); "exit Quit sftp\n"
printf("get remote-path [local-path] Download file\n"); "get [-P] remote-path [local-path] Download file\n"
printf("lls [ls-options [path]] Display local directory listing\n"); "help Display this help text\n"
printf("ln oldpath newpath Symlink remote file\n"); "lcd path Change local directory to 'path'\n"
printf("lmkdir path Create local directory\n"); "lls [ls-options [path]] Display local directory listing\n"
printf("lpwd Print local working directory\n"); "lmkdir path Create local directory\n"
printf("ls [path] Display remote directory listing\n"); "ln oldpath newpath Symlink remote file\n"
printf("lumask umask Set local umask to 'umask'\n"); "lpwd Print local working directory\n"
printf("mkdir path Create remote directory\n"); "ls [-1aflnrSt] [path] Display remote directory listing\n"
printf("progress Toggle display of progress meter\n"); "lumask umask Set local umask to 'umask'\n"
printf("put local-path [remote-path] Upload file\n"); "mkdir path Create remote directory\n"
printf("pwd Display remote working directory\n"); "progress Toggle display of progress meter\n"
printf("exit Quit sftp\n"); "put [-P] local-path [remote-path] Upload file\n"
printf("quit Quit sftp\n"); "pwd Display remote working directory\n"
printf("rename oldpath newpath Rename remote file\n"); "quit Quit sftp\n"
printf("rmdir path Remove remote directory\n"); "rename oldpath newpath Rename remote file\n"
printf("rm path Delete remote file\n"); "rm path Delete remote file\n"
printf("symlink oldpath newpath Symlink remote file\n"); "rmdir path Remove remote directory\n"
printf("version Show SFTP version\n"); "symlink oldpath newpath Symlink remote file\n"
printf("!command Execute 'command' in local shell\n"); "version Show SFTP version\n"
printf("! Escape to local shell\n"); "!command Execute 'command' in local shell\n"
printf("? Synonym for help\n"); "! Escape to local shell\n"
"? Synonym for help\n");
} }
static void static void