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