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