summaryrefslogtreecommitdiff
path: root/sftp.1
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-12-06 22:46:45 +1100
committerDarren Tucker <dtucker@zip.com.au>2004-12-06 22:46:45 +1100
commit16e254d17934437a811e0019107ad53cdea8eb76 (patch)
treebdc38ba3e18f1118f857548e9b655ab6ea346f8d /sftp.1
parente2f189a841c9beecae75a2df3784d73f9e6dd762 (diff)
- 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
Diffstat (limited to 'sftp.1')
-rw-r--r--sftp.1116
1 files changed, 85 insertions, 31 deletions
diff --git a/sftp.1 b/sftp.1
index f438949dd..bcd7fdf78 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.59 2004/11/29 00:05:17 jmc Exp $ 1.\" $OpenBSD: sftp.1,v 1.60 2004/12/05 23:55:07 jaredy Exp $
2.\" 2.\"
3.\" Copyright (c) 2001 Damien Miller. All rights reserved. 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -71,7 +71,9 @@ The second usage format will retrieve files automatically if a non-interactive
71authentication method is used; otherwise it will do so after 71authentication method is used; otherwise it will do so after
72successful interactive authentication. 72successful interactive authentication.
73.Pp 73.Pp
74The third usage format allows the sftp client to start in a remote directory. 74The third usage format allows
75.Nm
76to start in a remote directory.
75.Pp 77.Pp
76The final usage format allows for automated sessions using the 78The final usage format allows for automated sessions using the
77.Fl b 79.Fl b
@@ -224,9 +226,13 @@ Once in interactive mode,
224.Nm 226.Nm
225understands a set of commands similar to those of 227understands a set of commands similar to those of
226.Xr ftp 1 . 228.Xr ftp 1 .
227Commands are case insensitive and pathnames may be enclosed in quotes if they 229Commands are case insensitive.
228contain spaces. 230Pathnames that contain spaces must be enclosed in quotes.
229.Bl -tag -width "lmdir path" 231Any special characters contained within pathnames that are recognized by
232.Xr glob 3
233must be escaped with backslashes
234.Pq Sq \e .
235.Bl -tag -width Ds
230.It Ic bye 236.It Ic bye
231Quit 237Quit
232.Nm sftp . 238.Nm sftp .
@@ -238,6 +244,10 @@ Change group of file
238.Ar path 244.Ar path
239to 245to
240.Ar grp . 246.Ar grp .
247.Ar path
248may contain
249.Xr glob 3
250characters and may match multiple files.
241.Ar grp 251.Ar grp
242must be a numeric GID. 252must be a numeric GID.
243.It Ic chmod Ar mode Ar path 253.It Ic chmod Ar mode Ar path
@@ -245,18 +255,26 @@ Change permissions of file
245.Ar path 255.Ar path
246to 256to
247.Ar mode . 257.Ar mode .
258.Ar path
259may contain
260.Xr glob 3
261characters and may match multiple files.
248.It Ic chown Ar own Ar path 262.It Ic chown Ar own Ar path
249Change owner of file 263Change owner of file
250.Ar path 264.Ar path
251to 265to
252.Ar own . 266.Ar own .
267.Ar path
268may contain
269.Xr glob 3
270characters and may match multiple files.
253.Ar own 271.Ar own
254must be a numeric UID. 272must be a numeric UID.
255.It Ic exit 273.It Ic exit
256Quit 274Quit
257.Nm sftp . 275.Nm sftp .
258.It Xo Ic get 276.It Xo Ic get
259.Op Ar flags 277.Op Fl P
260.Ar remote-path 278.Ar remote-path
261.Op Ar local-path 279.Op Ar local-path
262.Xc 280.Xc
@@ -266,9 +284,18 @@ and store it on the local machine.
266If the local 284If the local
267path name is not specified, it is given the same name it has on the 285path name is not specified, it is given the same name it has on the
268remote machine. 286remote machine.
287.Ar remote-path
288may contain
289.Xr glob 3
290characters and may match multiple files.
291If it does and
292.Ar local-path
293is specified, then
294.Ar local-path
295must specify a directory.
269If the 296If the
270.Fl P 297.Fl P
271flag is specified, then the file's full permission and access time are 298flag is specified, then full file permissions and access times are
272copied too. 299copied too.
273.It Ic help 300.It Ic help
274Display help text. 301Display help text.
@@ -281,6 +308,14 @@ Display local directory listing of either
281or current directory if 308or current directory if
282.Ar path 309.Ar path
283is not specified. 310is not specified.
311.Ar ls-options
312may contain any flags supported by the local system's
313.Xr ls 1
314command.
315.Ar path
316may contain
317.Xr glob 3
318characters and may match multiple files.
284.It Ic lmkdir Ar path 319.It Ic lmkdir Ar path
285Create local directory specified by 320Create local directory specified by
286.Ar path . 321.Ar path .
@@ -292,36 +327,44 @@ to
292.It Ic lpwd 327.It Ic lpwd
293Print local working directory. 328Print local working directory.
294.It Xo Ic ls 329.It Xo Ic ls
295.Op Ar flags 330.Op Fl 1aflnrSt
296.Op Ar path 331.Op Ar path
297.Xc 332.Xc
298Display remote directory listing of either 333Display a remote directory listing of either
299.Ar path 334.Ar path
300or current directory if 335or the current directory if
301.Ar path 336.Ar path
302is not specified. 337is not specified.
303If the 338.Ar path
304.Fl l 339may contain
305flag is specified, then display additional details including permissions 340.Xr glob 3
306and ownership information. 341characters and may match multiple files.
307The
308.Fl n
309flag will produce a long listing with user and group information presented
310numerically.
311.Pp 342.Pp
312By default, 343The following flags are recognized and alter the behaviour of
313.Ic ls 344.Ic ls
314listings are sorted in lexicographical order. 345accordingly:
315This may be changed by specifying the 346.Bl -tag -width Ds
316.Fl S 347.It Fl 1
317(sort by file size), 348Produce single columnar output.
318.Fl t 349.It Fl a
319(sort by last modification time), or 350List files beginning with a dot
320.Fl f 351.Pq Sq \&. .
321(don't sort at all) flags. 352.It Fl f
322Additionally, the sort order may be reversed using the 353Do not sort the listing.
323.Fl r 354The default sort order is lexicographical.
324flag. 355.It Fl l
356Display additional details including permissions
357and ownership information.
358.It Fl n
359Produce a long listing with user and group information presented
360numerically.
361.It Fl r
362Reverse the sort order of the listing.
363.It Fl S
364Sort the listing by file size.
365.It Fl t
366Sort the listing by last modification time.
367.El
325.It Ic lumask Ar umask 368.It Ic lumask Ar umask
326Set local umask to 369Set local umask to
327.Ar umask . 370.Ar umask .
@@ -331,7 +374,7 @@ Create remote directory specified by
331.It Ic progress 374.It Ic progress
332Toggle display of progress meter. 375Toggle display of progress meter.
333.It Xo Ic put 376.It Xo Ic put
334.Op Ar flags 377.Op Fl P
335.Ar local-path 378.Ar local-path
336.Op Ar remote-path 379.Op Ar remote-path
337.Xc 380.Xc
@@ -340,6 +383,15 @@ Upload
340and store it on the remote machine. 383and store it on the remote machine.
341If the remote path name is not specified, it is given the same name it has 384If the remote path name is not specified, it is given the same name it has
342on the local machine. 385on the local machine.
386.Ar local-path
387may contain
388.Xr glob 3
389characters and may match multiple files.
390If it does and
391.Ar remote-path
392is specified, then
393.Ar remote-path
394must specify a directory.
343If the 395If the
344.Fl P 396.Fl P
345flag is specified, then the file's full permission and access time are 397flag is specified, then the file's full permission and access time are
@@ -380,10 +432,12 @@ Synonym for help.
380.El 432.El
381.Sh SEE ALSO 433.Sh SEE ALSO
382.Xr ftp 1 , 434.Xr ftp 1 ,
435.Xr ls 1 ,
383.Xr scp 1 , 436.Xr scp 1 ,
384.Xr ssh 1 , 437.Xr ssh 1 ,
385.Xr ssh-add 1 , 438.Xr ssh-add 1 ,
386.Xr ssh-keygen 1 , 439.Xr ssh-keygen 1 ,
440.Xr glob 3 ,
387.Xr ssh_config 5 , 441.Xr ssh_config 5 ,
388.Xr sftp-server 8 , 442.Xr sftp-server 8 ,
389.Xr sshd 8 443.Xr sshd 8