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 16 2021 $
16 .Dt KAMIREPL 1
17 .Os
18 .Sh NAME
19 .Nm kamirepl
20 .Nd 9p repl client
21 .Sh SYNOPSIS
22 .Nm
23 .Op Fl chv
24 .Op Fl C Ar cert
25 .Op Fl H Ar host
26 .Op Fl K Ar key
27 .Op Fl P Ar port
28 .Sh DESCRIPTION
29 .Nm
30 is a
31 .Xr 9p 7
32 repl client.
33 .Pp
34 The optinos are as follows:
35 .Bl -tag -width tenletters
36 .It Fl C Ar cert
37 Path to the TLS client certificate to use.
38 .It Fl c
39 Use TLS for the connection.
40 .Fl C
41 and
42 .Fl K
43 are mandatory if used.
44 .It Fl H Ar host
45 Hostname of the file server.
46 .It Fl h
47 Display usage and exit.
48 .It Fl K Ar key
49 Path to the TLS client certificate private key.
50 .It Fl P Ar port
51 Port number to connect to.
52 .It Fl v
53 Verbose logging.
54 .El
55 .Pp
56 The interactive commands are
57 .Bl -tag -width Ds
58 .It Ic version Op Ar version-string
59 .Ar version-string
60 is
61 .Dq 9P2000
62 by default.
63 .It Ic attach Ar fid Ar uname Ar aname
64 Request the file server to attach the file tree identified by
65 .Ar aname
66 to the specified
67 .Ar fid
68 number.
69 .Ar aname
70 is the identifier for the user.
71 The afid used is implicitly NOFID.
72 .It Ic clunk Ar fid
73 Closes
74 .Ar fid.
75 .It Ic flush Ar oldtag
76 Require the server to flush
77 .Ar oldtag .
78 .It Ic walk Ar fid Ar newfid Ar wnames...
79 Do a walk from
80 .Ar fid
81 following
82 .Ar wnames
83 component and associating the reached file to
84 .Ar newfid .
85 .It Ic open Ar fid Ar mode Op Ar flag
86 Prepare
87 .Ar fid
88 for I/O.
89 .Ar mode
90 can be one of
91 .Sq read
92 or
93 .Sq r ,
94 .Sq write
95 or
96 .Sq w ,
97 .Sq readwrite
98 or
99 .Sq rdwr .
100 Optionally,
101 .Ar flag
102 can be on of
103 .Sq trunc
104 to truncate the file or
105 .Sq rclose
106 to remove the file upon
107 .Ic clunk .
108 .It Ic create Ar fid Ar name Ar perm Ar mode
109 Create the file
110 .Ar name
111 and open it with
112 .Ar mode
113 as the given
114 .Ar fid.
115 .Ar perm
116 should be used to select the permissions of the file, but is currently
117 unused.
118 .It Ic read Ar fid Ar offset Ar count
119 Issue a read request for the given
120 .Ar fid ,
121 which must have been prepared for I/O with
122 .Ic open ,
123 at
124 .Ar offset
125 and for
126 .Ar count
127 bytes.
128 .It Ic write Ar fid Ar offset Ar content
129 Writes
130 .Ar content
131 to
132 .Ar fid
133 starting at
134 .Ar offset .
135 .It Ic remove Ar fid
136 Delete the file identified by
137 .Ar fid
138 and close it.
139 Even in case of error,
140 .Ar fid
141 is clunked.
142 .El
143 .Sh SEE ALSO
144 .Xr kamiftp 1
145 .Xr 9p 7
146 .Xr kamid 8
147 .Sh AUTHORS
148 .An -nosplit
149 The
150 .Nm
151 utility was written by
152 .An Omar Polo Aq Mt op@omarpolo.com .