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 If used,
38 .Fl C
39 is mandatory.
40 .It Fl C Ar certificate
41 Specify the path to the client
42 .Ar certificate
43 to be use during the TLS handsahke.
44 Implies
45 .Fl c .
46 .It Fl K Ar key
47 Specify the path to the client certificate
48 .Ar key
49 to be used during the TLS handshake.
50 If not given, the file passed to
51 .Fl C
52 will be used.
53 Implies
54 .Fl c .
55 .El
56 .Pp
57 The following commands are recognized by
58 .Nm :
59 .Bl -tag -width Ds
60 .It Ic bell Oo Cm on | off Oc
61 Request terminal to sound a bell after each command.
62 Without arguments toggle the current state.
63 .It Ic bye
64 Terminate the session.
65 Synomym of
66 .Ic quit .
67 .It Ic cd Ar remote-path
68 Change the working directory on the remote machine to
69 .Ar remote-path .
70 .It Ic edit Ar remote-path
71 Download
72 .Ar remote-path
73 and open it with the preferred editor
74 .Po
75 .Ev VISUAL
76 or
77 .Ev EDITOR
78 with
79 .Xr ed 1
80 as fallback
81 .Pc
82 then attempt to re-upload it.
83 .It Ic get Ar remote-file Op Ar local-file
84 Fetch
85 .Ar remote-file
86 and save it locally as
87 .Ar local-file .
88 If
89 .Ar local-file
90 is not given, use the file name from
91 .Ar remote-file .
92 .It Ic hexdump Oo Cm on | off Oc
93 Print the packets sent from/to the server.
94 Without arguments, toggle the current state.
95 .It Ic lcd Op Ar local-directory
96 Change the local current working directory to
97 .Ar local-directory
98 or the
99 .Ev HOME
100 if not given.
101 .It Ic lpwd
102 Print the local working directory.
103 .It Ic ls
104 List the file in the remote current working directory.
105 .It Ic page Ar remote-file
106 Download
107 .Ar remote-file
108 and open it with the
109 .Ev PAGER
110 .Pq Xr less 1 by default .
111 .It Ic pipe Ar remote-file Ar cmd Op Ar args...
112 Fetch
113 .Ar remote-file
114 and pass it as standard input for
115 .Ar cmd
116 (with optional
117 .Ar args Ns ).
118 .It Ic put Ar local-file Op Ar remote-file
119 Upload
120 .Ar local-file
121 to
122 .Ar remote-file .
123 If
124 .Ar remote-file
125 is not given,
126 use the file name from
127 .Ar local-file .
128 .It Ic quit
129 Terminate the session.
130 Synomym of
131 .Ic bye .
132 .It Ic rename Ar remote-file Ar new-remote-name
133 Renames
134 .Ar remote-file
135 to
136 .Ar new-remote-name
137 on the remote server.
138 .It Ic verbose Oo Cm on | off Oc
139 Print verbose information.
140 Without arguments toggle the current state.
141 .El
142 .Sh ENVIRONMENT
143 The following environment variables are inspected:
144 .Bl -tag -width Ds
145 .It Ev HOME
146 The user login directory.
147 .It Ev PAGER
148 The pager to use,
149 .Xr less 1
150 by default.
151 .It Ev VISUAL, Ev EDITOR
152 The program used to edit files.
153 .Ev VISUAL
154 is inspected first,
155 .Ev EDITOR
156 as a fallback.
157 If both are undefined,
158 .Xr ed 1
159 is given some love.
160 .El
161 .Sh SEE ALSO
162 .Xr 9p 7 ,
163 .Xr kamid 8
164 .Sh AUTHORS
165 The
166 .Nm
167 utility was written by
168 .An Omar Polo Aq Mt op@omarpolo.com .