[sftp.1]
     - explain that patterns can be used as arguments in get/put/ls/etc
       commands (prodded by Michael Knudsen)
     - describe ls flags as a list
     - other minor improvements
     ok jmc, djm
This commit is contained in:
Darren Tucker 2004-12-06 22:46:45 +11:00
parent e2f189a841
commit 16e254d179
2 changed files with 93 additions and 32 deletions

View File

@ -10,6 +10,13 @@
- djm@cvs.openbsd.org 2004/11/29 07:41:24 - djm@cvs.openbsd.org 2004/11/29 07:41:24
[sftp-client.h sftp.c] [sftp-client.h sftp.c]
Some small fixes from moritz@jodeit.org. ok deraadt@ Some small fixes from moritz@jodeit.org. ok deraadt@
- jaredy@cvs.openbsd.org 2004/12/05 23:55:07
[sftp.1]
- explain that patterns can be used as arguments in get/put/ls/etc
commands (prodded by Michael Knudsen)
- describe ls flags as a list
- other minor improvements
ok jmc, djm
20041203 20041203
- (dtucker) OpenBSD CVS Sync - (dtucker) OpenBSD CVS Sync
@ -1883,4 +1890,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM - (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
$Id: ChangeLog,v 1.3588 2004/12/06 11:45:53 dtucker Exp $ $Id: ChangeLog,v 1.3589 2004/12/06 11:46:45 dtucker Exp $

116
sftp.1
View File

@ -1,4 +1,4 @@
.\" $OpenBSD: sftp.1,v 1.59 2004/11/29 00:05:17 jmc Exp $ .\" $OpenBSD: sftp.1,v 1.60 2004/12/05 23:55:07 jaredy Exp $
.\" .\"
.\" Copyright (c) 2001 Damien Miller. All rights reserved. .\" Copyright (c) 2001 Damien Miller. All rights reserved.
.\" .\"
@ -71,7 +71,9 @@ The second usage format will retrieve files automatically if a non-interactive
authentication method is used; otherwise it will do so after authentication method is used; otherwise it will do so after
successful interactive authentication. successful interactive authentication.
.Pp .Pp
The third usage format allows the sftp client to start in a remote directory. The third usage format allows
.Nm
to start in a remote directory.
.Pp .Pp
The final usage format allows for automated sessions using the The final usage format allows for automated sessions using the
.Fl b .Fl b
@ -224,9 +226,13 @@ Once in interactive mode,
.Nm .Nm
understands a set of commands similar to those of understands a set of commands similar to those of
.Xr ftp 1 . .Xr ftp 1 .
Commands are case insensitive and pathnames may be enclosed in quotes if they Commands are case insensitive.
contain spaces. Pathnames that contain spaces must be enclosed in quotes.
.Bl -tag -width "lmdir path" Any special characters contained within pathnames that are recognized by
.Xr glob 3
must be escaped with backslashes
.Pq Sq \e .
.Bl -tag -width Ds
.It Ic bye .It Ic bye
Quit Quit
.Nm sftp . .Nm sftp .
@ -238,6 +244,10 @@ Change group of file
.Ar path .Ar path
to to
.Ar grp . .Ar grp .
.Ar path
may contain
.Xr glob 3
characters and may match multiple files.
.Ar grp .Ar grp
must be a numeric GID. must be a numeric GID.
.It Ic chmod Ar mode Ar path .It Ic chmod Ar mode Ar path
@ -245,18 +255,26 @@ Change permissions of file
.Ar path .Ar path
to to
.Ar mode . .Ar mode .
.Ar path
may contain
.Xr glob 3
characters and may match multiple files.
.It Ic chown Ar own Ar path .It Ic chown Ar own Ar path
Change owner of file Change owner of file
.Ar path .Ar path
to to
.Ar own . .Ar own .
.Ar path
may contain
.Xr glob 3
characters and may match multiple files.
.Ar own .Ar own
must be a numeric UID. must be a numeric UID.
.It Ic exit .It Ic exit
Quit Quit
.Nm sftp . .Nm sftp .
.It Xo Ic get .It Xo Ic get
.Op Ar flags .Op Fl P
.Ar remote-path .Ar remote-path
.Op Ar local-path .Op Ar local-path
.Xc .Xc
@ -266,9 +284,18 @@ and store it on the local machine.
If the local If the local
path name is not specified, it is given the same name it has on the path name is not specified, it is given the same name it has on the
remote machine. remote machine.
.Ar remote-path
may contain
.Xr glob 3
characters and may match multiple files.
If it does and
.Ar local-path
is specified, then
.Ar local-path
must specify a directory.
If the If the
.Fl P .Fl P
flag is specified, then the file's full permission and access time are flag is specified, then full file permissions and access times are
copied too. copied too.
.It Ic help .It Ic help
Display help text. Display help text.
@ -281,6 +308,14 @@ Display local directory listing of either
or current directory if or current directory if
.Ar path .Ar path
is not specified. is not specified.
.Ar ls-options
may contain any flags supported by the local system's
.Xr ls 1
command.
.Ar path
may contain
.Xr glob 3
characters and may match multiple files.
.It Ic lmkdir Ar path .It Ic lmkdir Ar path
Create local directory specified by Create local directory specified by
.Ar path . .Ar path .
@ -292,36 +327,44 @@ to
.It Ic lpwd .It Ic lpwd
Print local working directory. Print local working directory.
.It Xo Ic ls .It Xo Ic ls
.Op Ar flags .Op Fl 1aflnrSt
.Op Ar path .Op Ar path
.Xc .Xc
Display remote directory listing of either Display a remote directory listing of either
.Ar path .Ar path
or current directory if or the current directory if
.Ar path .Ar path
is not specified. is not specified.
If the .Ar path
.Fl l may contain
flag is specified, then display additional details including permissions .Xr glob 3
and ownership information. characters and may match multiple files.
The
.Fl n
flag will produce a long listing with user and group information presented
numerically.
.Pp .Pp
By default, The following flags are recognized and alter the behaviour of
.Ic ls .Ic ls
listings are sorted in lexicographical order. accordingly:
This may be changed by specifying the .Bl -tag -width Ds
.Fl S .It Fl 1
(sort by file size), Produce single columnar output.
.Fl t .It Fl a
(sort by last modification time), or List files beginning with a dot
.Fl f .Pq Sq \&. .
(don't sort at all) flags. .It Fl f
Additionally, the sort order may be reversed using the Do not sort the listing.
.Fl r The default sort order is lexicographical.
flag. .It Fl l
Display additional details including permissions
and ownership information.
.It Fl n
Produce a long listing with user and group information presented
numerically.
.It Fl r
Reverse the sort order of the listing.
.It Fl S
Sort the listing by file size.
.It Fl t
Sort the listing by last modification time.
.El
.It Ic lumask Ar umask .It Ic lumask Ar umask
Set local umask to Set local umask to
.Ar umask . .Ar umask .
@ -331,7 +374,7 @@ Create remote directory specified by
.It Ic progress .It Ic progress
Toggle display of progress meter. Toggle display of progress meter.
.It Xo Ic put .It Xo Ic put
.Op Ar flags .Op Fl P
.Ar local-path .Ar local-path
.Op Ar remote-path .Op Ar remote-path
.Xc .Xc
@ -340,6 +383,15 @@ Upload
and store it on the remote machine. and store it on the remote machine.
If the remote path name is not specified, it is given the same name it has If the remote path name is not specified, it is given the same name it has
on the local machine. on the local machine.
.Ar local-path
may contain
.Xr glob 3
characters and may match multiple files.
If it does and
.Ar remote-path
is specified, then
.Ar remote-path
must specify a directory.
If the If the
.Fl P .Fl P
flag is specified, then the file's full permission and access time are flag is specified, then the file's full permission and access time are
@ -380,10 +432,12 @@ Synonym for help.
.El .El
.Sh SEE ALSO .Sh SEE ALSO
.Xr ftp 1 , .Xr ftp 1 ,
.Xr ls 1 ,
.Xr scp 1 , .Xr scp 1 ,
.Xr ssh 1 , .Xr ssh 1 ,
.Xr ssh-add 1 , .Xr ssh-add 1 ,
.Xr ssh-keygen 1 , .Xr ssh-keygen 1 ,
.Xr glob 3 ,
.Xr ssh_config 5 , .Xr ssh_config 5 ,
.Xr sftp-server 8 , .Xr sftp-server 8 ,
.Xr sshd 8 .Xr sshd 8