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