]> git.lizzy.rs Git - plan9front.git/blob - sys/man/8/hjfs
merge
[plan9front.git] / sys / man / 8 / hjfs
1 .TH HJFS 8
2 .SH NAME
3 hjfs \- file server maintenance
4 .SH SYNOPSIS
5 .PD 0
6 .PP
7 .B allow
8 .PP
9 .B chatty
10 .PP
11 .B create
12 .I path uid gid perm
13 .RB [ lad ]
14 .PP
15 .B df
16 .PP
17 .B disallow
18 .PP
19 .B dump
20 .PP
21 .B echo
22 .RB [on | off]
23 .PP
24 .B halt
25 .PP
26 .B newuser
27 .I name
28 .RI [ options ]
29 .PP
30 .B users
31 .PP
32 .B sync
33 .PP
34 .B debug-chdeind
35 .I file
36 .RB [offset
37 .RB value]
38 .PP
39 .B debug-deind
40 .I file
41 .PP
42 .B debug-getblk
43 .I file
44 .RB [blk | start
45 .RB end]
46 .SH DESCRIPTION
47 The following commands should be written to the console of an
48 .IR hjfs (4)
49 file server.
50 .PP
51 .I Allow
52 disables permission checking and allows
53 .BR chown .
54 This may help in initializing a file system.
55 Use this with caution.
56 .PP
57 .I Chatty
58 enables chatty 9p.
59 .PP
60 .I Create
61 creates a file on the current file system.
62 .I Uid
63 and
64 .I gid
65 are names or numbers from
66 .BR /adm/users .
67 .I Perm
68 is the low 9 bits of the permission mode of the file, in octal.
69 An optional final
70 .BR l ,
71 .BR a ,
72 or
73 .BR d
74 creates a locked file, append-only file, or directory.
75 .PP
76 .I Df
77 prints the number of free, used and total blocks/megabytes.
78 It scans the block table and can be slow on large hard disks.
79 .PP
80 .I Disallow
81 restores permission checking back to normal after a file system
82 has been initialized.
83 .PP
84 .I Dump
85 immediately starts a dump.
86 .PP
87 .I Echo
88 expects the argument
89 .I on
90 or
91 .I off.
92 .I  On
93 causes all executed commands to be printed on the system console.
94 .I Off
95 reverses the effects of
96 .I on.
97 .PP
98 .I Halt
99 exits the program.
100 .PP
101 .I Newuser
102 requires a
103 .I name
104 argument.
105 With no options it adds user
106 .IR name ,
107 with group leader
108 .IR name ,
109 to
110 .B /adm/users
111 and makes the directory
112 .BI /usr/ name
113 owned by user and group
114 .IR name .
115 The options are
116 .TF =leaderxx
117 .TP
118 .B :
119 Add a group: add the name to
120 .B /adm/users
121 but don't create the directory.
122 By convention, groups are numbered starting from 10000, users from 0.
123 .TP
124 .I newname
125 Rename existing user
126 .I name
127 to
128 .IR newname .
129 .TP
130 .BI = leader
131 Change the leader of
132 .I name
133 to
134 .IR leader .
135 If
136 .I leader
137 is missing, remove the existing leader.
138 .TP
139 .BI + member
140 Add
141 .I member
142 to the member list of
143 .IR name .
144 .TP
145 .BI - member
146 Remove existing
147 .I member
148 from the member list of
149 .IR name .
150 .PD
151 .PP
152 After a successful
153 .I newuser
154 command the file server overwrites
155 .B /adm/users
156 to reflect the internal state of the user table.
157 .PP
158 .I Users
159 reads the contents of file 
160 .B /adm/users
161 to initialize the file server's internal representation of the
162 users structure.
163 .PP
164 .I Sync
165 writes dirty blocks in memory to the magnetic disk cache.
166 .PP
167 Note: Debug commands operate on internal data
168 structures; they are inherently dangerous and can cause
169 file system damage.
170 .PP
171 .I Debug-chdeind
172 changes the value of the byte at the specified
173 .I offset
174 in the in-memory directory entry and prints
175 the old
176 .I value.
177 Dangerous if used carelessly.
178 .PP
179 .I Debug-deind
180 requiers a
181 .I file
182 argument. It prints the directory entry of
183 .I file.
184 .PP
185 .I Debug-getblk
186 prints the physical blocks of
187 .I file
188 corresponding to the logical block
189 .I blk
190 or the logical blocks between
191 .I start
192 and
193 .I end. 
194 .SH EXAMPLES
195 Check disk usage (output appears on the system console).
196 .IP
197 .EX
198 % echo df >>/srv/hjfs.cmd
199 .EE
200 .SH SEE ALSO
201 .IR hjfs (4)
202 .SH SOURCE
203 .B /sys/src/cmd/hjfs
204 .SH BUGS
205 .B Debug-chdeind
206 should perhaps be less crazy and have a portable interface.