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 read Ar fid Ar offset Ar count
109 Issue a read request for the given
110 .Ar fid ,
111 which must have been prepared for I/O with
112 .Ic open ,
113 at
114 .Ar offset
115 and for
116 .Ar count
117 bytes.
118 .El
119 .Sh SEE ALSO
120 .Xr kamiftp 1
121 .Xr 9p 7
122 .Xr kamid 8
123 .Sh AUTHORS
124 .An -nosplit
125 The
126 .Nm
127 utility was written by
128 .An Omar Polo Aq Mt op@omarpolo.com .