Blob


1 .\" Copyright (c) 2021 Omar Polo <op@omarpolo.com>
2 .\"
3 .\" Permission to use, copy, modify, and distribute this software for any
4 .\" purpose with or without fee is hereby granted, provided that the above
5 .\" copyright notice and this permission notice appear in all copies.
6 .\"
7 .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 .\"
15 .Dd $Mdocdate: December 14 2021 $
16 .Dt KAMIFTP 1
17 .Os
18 .Sh NAME
19 .Nm kamiftp
20 .Nd 9p client
21 .Sh SYNOPSIS
22 .Nm
23 .Op Fl c
24 .Op Fl C Ar cert
25 .Op Fl K Ar key
26 .Ar host Op Ar path
27 .Sh DESCRIPTION
28 .Nm
29 is a
30 .Xr 9p 7
31 client.
32 .Pp
33 The options are as follows:
34 .Bl -tag -width Ds
35 .It Fl c
36 Use TLS for the connection.
37 .Fl K
38 and
39 .Fl C
40 are mandatory if
41 .Fl c
42 is used.
43 .It Fl C Ar certificate
44 Specify the path to the client
45 .Ar certificate
46 to be use during the TLS handsahke.
47 .It Fl K Ar key
48 Specify the path to the client certificate
49 .Ar key
50 to be used during the TLS handshake.
51 .El
52 .Pp
53 The following commands are recognized by
54 .Nm :
55 .Bl -tag -width Ds
56 .It Ic bell Oo Cm on | off Oc
57 Request terminal to sound a bell after each command.
58 Without arguments toggle the current state.
59 .It Ic bye
60 Terminate the session.
61 Synomym of
62 .Ic quit .
63 .It Ic cd Ar remote-path
64 Change the working directory on the remote machine to
65 .Ar remote-path .
66 .It Ic edit Ar remote-path
67 Download
68 .Ar remote-path
69 and open it with the preferred editor
70 .Po
71 .Ev VISUAL
72 or
73 .Ev EDITOR
74 with
75 .Xr ed 1
76 as fallback
77 .Pc
78 then attempt to re-upload it.
79 .It Ic get Ar remote-file Op Ar local-file
80 Fetch
81 .Ar remote-file
82 and save it locally as
83 .Ar local-file .
84 If
85 .Ar local-file
86 is not given, use the file name from
87 .Ar remote-file .
88 .It Ic hexdump Oo Cm on | off Oc
89 Print the packets sent from/to the server.
90 Without arguments, toggle the current state.
91 .It Ic lcd Op Ar local-directory
92 Change the local current working directory to
93 .Ar local-directory
94 or the
95 .Ev HOME
96 if not given.
97 .It Ic lpwd
98 Print the local working directory.
99 .It Ic ls
100 List the file in the remote current working directory.
101 .It Ic page Ar remote-file
102 Download
103 .Ar remote-file
104 and open it with the
105 .Ev PAGER
106 .Pq Xr less 1 by default .
107 .It Ic pipe Ar remote-file Ar cmd Op Ar args...
108 Fetch
109 .Ar remote-file
110 and pass it as standard input for
111 .Ar cmd
112 (with optional
113 .Ar args Ns ).
114 .It Ic put Ar local-file Op Ar remote-file
115 Upload
116 .Ar local-file
117 to
118 .Ar remote-file .
119 If
120 .Ar remote-file
121 is not given,
122 use the file name from
123 .Ar local-file .
124 .It Ic quit
125 Terminate the session.
126 Synomym of
127 .Ic bye .
128 .It Ic rename Ar remote-file Ar new-remote-name
129 Renames
130 .Ar remote-file
131 to
132 .Ar new-remote-name
133 on the remote server.
134 .It Ic verbose Oo Cm on | off Oc
135 Print verbose information.
136 Without arguments toggle the current state.
137 .El
138 .Sh ENVIRONMENT
139 The following environment variables are inspected:
140 .Bl -tag -width Ds
141 .It Ev HOME
142 The user login directory.
143 .It Ev PAGER
144 The pager to use,
145 .Xr less 1
146 by default.
147 .It Ev VISUAL, Ev EDITOR
148 The program used to edit files.
149 .Ev VISUAL
150 is inspected first,
151 .Ev EDITOR
152 as a fallback.
153 If both are undefined,
154 .Xr ed 1
155 is given some love.
156 .El
157 .Sh SEE ALSO
158 .Xr 9p 7 ,
159 .Xr kamid 8
160 .Sh AUTHORS
161 The
162 .Nm
163 utility was written by
164 .An Omar Polo Aq Mt op@omarpolo.com .