Print this page
10057 Man page misspellings ouput particuliar overriden
Reviewed by: Gergő Mihály Doma <domag02@gmail.com>
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/man/man1m/fsdb_ufs.1m
+++ new/usr/src/man/man1m/fsdb_ufs.1m
1 1 '\" te
2 2 .\" Copyright (c) 1988 Regents of the University
3 3 .\" of California. All rights reserved. Copyright (c) 2003 Sun Microsystems,
4 4 .\" Inc. All Rights Reserved.
↓ open down ↓ |
4 lines elided |
↑ open up ↑ |
5 5 .TH FSDB_UFS 1M "Apr 14, 2003"
6 6 .SH NAME
7 7 fsdb_ufs \- ufs file system debugger
8 8 .SH SYNOPSIS
9 9 .LP
10 10 .nf
11 11 \fBfsdb\fR \fB-F\fR ufs [\fIgeneric_options\fR] [\fIspecific_options\fR] \fIspecial\fR
12 12 .fi
13 13
14 14 .SH DESCRIPTION
15 -.sp
16 15 .LP
17 16 The \fBfsdb_ufs\fR command is an interactive tool that can be used to patch up
18 17 a damaged \fBUFS\fR file system. It has conversions to translate block and
19 18 i-numbers into their corresponding disk addresses. Also included are mnemonic
20 19 offsets to access different parts of an inode. These greatly simplify the
21 20 process of correcting control block entries or descending the file system tree.
22 21 .sp
23 22 .LP
24 23 \fBfsdb\fR contains several error-checking routines to verify inode and block
25 24 addresses. These can be disabled if necessary by invoking \fBfsdb\fR with the
26 25 \fB-o\fR option or by the use of the \fBo\fR command.
27 26 .sp
28 27 .LP
29 28 \fBfsdb\fR reads a block at a time and will therefore work with raw as well as
↓ open down ↓ |
4 lines elided |
↑ open up ↑ |
30 29 block \fBI/O\fR devices. A buffer management routine is used to retain commonly
31 30 used blocks of data in order to reduce the number of read system calls. All
32 31 assignment operations result in an immediate write-through of the corresponding
33 32 block. Note that in order to modify any portion of the disk, \fBfsdb\fR must be
34 33 invoked with the \fBw\fR option.
35 34 .sp
36 35 .LP
37 36 Wherever possible, \fBadb-\fRlike syntax was adopted to promote the use of
38 37 \fBfsdb\fR through familiarity.
39 38 .SH OPTIONS
40 -.sp
41 39 .LP
42 40 The following option is supported:
43 41 .sp
44 42 .ne 2
45 43 .na
46 44 \fB\fB-o\fR\fR
47 45 .ad
48 46 .RS 6n
49 47 Specify \fBUFS\fR file system specific options. These options can be any
50 48 combination of the following separated by commas (with no intervening spaces).
51 49 The options available are:
52 50 .sp
53 51 .ne 2
54 52 .na
55 53 \fB\fB?\fR\fR
56 54 .ad
57 55 .RS 14n
58 56 Display usage
59 57 .RE
60 58
61 59 .sp
62 60 .ne 2
63 61 .na
64 62 \fB\fBo\fR\fR
65 63 .ad
66 64 .RS 14n
67 65 Override some error conditions
68 66 .RE
69 67
70 68 .sp
71 69 .ne 2
72 70 .na
73 71 \fB\fBp='string'\fR\fR
74 72 .ad
75 73 .RS 14n
76 74 set prompt to string
77 75 .RE
78 76
79 77 .sp
80 78 .ne 2
↓ open down ↓ |
30 lines elided |
↑ open up ↑ |
81 79 .na
82 80 \fB\fBw\fR\fR
83 81 .ad
84 82 .RS 14n
85 83 open for write
86 84 .RE
87 85
88 86 .RE
89 87
90 88 .SH USAGE
91 -.sp
92 89 .LP
93 90 Numbers are considered hexadecimal by default. However, the user has control
94 91 over how data is to be displayed or accepted. The \fBbase\fR command will
95 92 display or set the input/output base. Once set, all input will default to this
96 93 base and all output will be shown in this base. The base can be overridden
97 94 temporarily for input by preceding hexadecimal numbers with \&'\fB0x\fR',
98 95 preceding decimal numbers with '\fB0t\fR', or octal numbers with '\fB0\fR'.
99 96 Hexadecimal numbers beginning with \fBa-f\fR or \fBA-F\fR must be preceded with
100 97 \&'\fB0x\fR' to distinguish them from commands.
101 98 .sp
102 99 .LP
103 100 Disk addressing by \fBfsdb\fR is at the byte level. However, \fBfsdb\fR offers
104 101 many commands to convert a desired inode, directory entry, block, superblock
105 102 and so forth to a byte address. Once the address has been calculated,
106 103 \fBfsdb\fR will record the result in dot (\fB\&.\fR).
107 104 .sp
108 105 .LP
109 106 Several global values are maintained by \fBfsdb\fR:
110 107 .RS +4
111 108 .TP
112 109 .ie t \(bu
113 110 .el o
114 111 the current base (referred to as \fBbase\fR),
115 112 .RE
116 113 .RS +4
117 114 .TP
118 115 .ie t \(bu
119 116 .el o
120 117 the current address (referred to as \fBdot\fR),
121 118 .RE
122 119 .RS +4
123 120 .TP
124 121 .ie t \(bu
125 122 .el o
126 123 the current inode (referred to as \fBinode\fR),
127 124 .RE
128 125 .RS +4
129 126 .TP
130 127 .ie t \(bu
131 128 .el o
132 129 the current count (referred to as \fBcount\fR),
133 130 .RE
134 131 .RS +4
135 132 .TP
136 133 .ie t \(bu
137 134 .el o
138 135 and the current type (referred to as \fBtype\fR).
139 136 .RE
140 137 .sp
141 138 .LP
142 139 Most commands use the preset value of \fBdot\fR in their execution. For
143 140 example,
144 141 .sp
145 142 .LP
146 143 \fB> 2:inode\fR
147 144 .sp
148 145 .LP
149 146 will first set the value of \fBdot\fR to 2, ':', will alert the start of a
150 147 command, and the \fBinode\fR command will set \fBinode\fR to 2. A count is
151 148 specified after a ','. Once set, \fBcount\fR will remain at this value until a
152 149 new command is encountered which will then reset the value back to 1 (the
153 150 default). So, if
154 151 .sp
155 152 .LP
156 153 \fB> 2000,400/X\fR
157 154 .sp
158 155 .LP
159 156 is typed, 400 hex longs are listed from 2000, and when completed, the value of
160 157 \fBdot\fR will be \fB2000 + 400 * sizeof (long)\fR. If a \fBRETURN\fR is then
161 158 typed, the output routine will use the current values of \fBdot\fR,
162 159 \fBcount\fR, and \fBtype\fR and display 400 more hex longs. A '*' will cause
163 160 the entire block to be displayed.
164 161 .sp
165 162 .LP
166 163 End of fragment, block and file are maintained by \fBfsdb\fR. When displaying
167 164 data as fragments or blocks, an error message will be displayed when the end of
168 165 fragment or block is reached. When displaying data using the \fBdb\fR,
169 166 \fBib\fR, \fBdirectory\fR, or \fBfile\fR commands an error message is displayed
170 167 if the end of file is reached. This is mainly needed to avoid passing the end
171 168 of a directory or file and getting unknown and unwanted results.
172 169 .sp
173 170 .LP
174 171 An example showing several commands and the use of \fBRETURN\fR would be:
175 172 .sp
176 173 .in +2
177 174 .nf
178 175 \fB> 2:ino; 0:dir?d\fR
179 176 or
180 177 \fB> 2:ino; 0:db:block?d\fR
181 178 .fi
182 179 .in -2
183 180 .sp
184 181
185 182 .sp
186 183 .LP
187 184 The two examples are synonymous for getting to the first directory entry of the
188 185 root of the file system. Once there, any subsequent \fBRETURN\fR (or +, -)
189 186 will advance to subsequent entries. Note that
190 187 .sp
191 188 .in +2
192 189 .nf
193 190 \fB> 2:inode; :ls\fR
↓ open down ↓ |
92 lines elided |
↑ open up ↑ |
194 191 or
195 192 \fB> :ls /\fR
196 193 .fi
197 194 .in -2
198 195 .sp
199 196
200 197 .sp
201 198 .LP
202 199 is again synonymous.
203 200 .SS "Expressions"
204 -.sp
205 201 .LP
206 202 The symbols recognized by \fBfsdb\fR are:
207 203 .sp
208 204 .ne 2
209 205 .na
210 206 \fB\fBRETURN\fR\fR
211 207 .ad
212 208 .RS 13n
213 209 update the value of \fBdot\fR by the current value of \fBtype\fR and display
214 210 using the current value of \fBcount\fR.
215 211 .RE
216 212
217 213 .sp
218 214 .ne 2
219 215 .na
220 216 \fB\fB#\fR\fR
221 217 .ad
222 218 .RS 13n
223 219 numeric expressions may be composed of +, -, *, and % operators (evaluated left
224 220 to right) and may use parentheses. Once evaluated, the value of \fBdot\fR is
225 221 updated.
226 222 .RE
227 223
228 224 .sp
229 225 .ne 2
230 226 .na
231 227 \fB\fB,\fR\fI count\fR\fR
232 228 .ad
233 229 .RS 13n
234 230 count indicator. The global value of \fBcount\fR will be updated to
235 231 \fBcount\fR. The value of \fBcount\fR will remain until a new command is run. A
236 232 count specifier of '*' will attempt to show a \fIblocks's\fR worth of
↓ open down ↓ |
22 lines elided |
↑ open up ↑ |
237 233 information. The default for \fBcount\fR is 1.
238 234 .RE
239 235
240 236 .sp
241 237 .ne 2
242 238 .na
243 239 \fB\fB?\fR\fI f\fR\fR
244 240 .ad
245 241 .RS 13n
246 242 display in structured style with format specifier \fIf\fR. See
247 -\fBFormatted\fROutput\fB\&.\fR
243 +\fBFormatted Output\fR.
248 244 .RE
249 245
250 246 .sp
251 247 .ne 2
252 248 .na
253 249 \fB\fB/\fR\fI f\fR\fR
254 250 .ad
255 251 .RS 13n
256 -display in unstructured style with format specifier \fIf\fR See
257 -\fBFormatted\fROutput\fB\&.\fR
252 +display in unstructured style with format specifier \fIf\fR. See
253 +\fBFormatted Output\fR.
258 254 .RE
259 255
260 256 .sp
261 257 .ne 2
262 258 .na
263 259 \fB\fB\&.\fR\fR
264 260 .ad
265 261 .RS 13n
266 262 the value of \fBdot\fR.
267 263 .RE
268 264
269 265 .sp
270 266 .ne 2
271 267 .na
272 268 \fB\fB+\fR\fIe\fR\fR
273 269 .ad
274 270 .RS 13n
275 271 increment the value of \fBdot\fR by the expression \fIe.\fR The amount actually
276 272 incremented is dependent on the size of \fBtype\fR:
277 273 .sp
278 274 \fBdot = dot + e * sizeof (type)\fR
↓ open down ↓ |
11 lines elided |
↑ open up ↑ |
279 275 .sp
280 276 The default for \fIe\fR is \fB1\fR.
281 277 .RE
282 278
283 279 .sp
284 280 .ne 2
285 281 .na
286 282 \fB\fB-\fR\fIe\fR\fR
287 283 .ad
288 284 .RS 13n
289 -decrement the value of \fBdot\fR by the expression \fIe\fR. See \fB+\fR.
285 +decrement the value of \fBdot\fR by the expression \fIe\fR. See \fB+\fR.
290 286 .RE
291 287
292 288 .sp
293 289 .ne 2
294 290 .na
295 291 \fB\fB*\fR\fIe\fR\fR
296 292 .ad
297 293 .RS 13n
298 294 multiply the value of \fBdot\fR by the expression \fIe.\fR Multiplication and
299 295 division don't use \fBtype\fR. In the above calculation of \fBdot\fR, consider
300 296 the \fBsizeof(type)\fR to be \fB1\fR.
301 297 .RE
302 298
303 299 .sp
304 300 .ne 2
305 301 .na
306 302 \fB\fB%\fR\fIe\fR\fR
307 303 .ad
308 304 .RS 13n
309 -divide the value of \fBdot\fR by the expression \fIe\fR. See \fB*\fR.
305 +divide the value of \fBdot\fR by the expression \fIe\fR. See \fB*\fR.
310 306 .RE
311 307
312 308 .sp
313 309 .ne 2
314 310 .na
315 311 \fB\fB<\fR\fI name\fR\fR
316 312 .ad
317 313 .RS 13n
318 314 restore an address saved in register \fIname\fR. \fIname\fR must be a single
319 315 letter or digit.
320 316 .RE
321 317
322 318 .sp
323 319 .ne 2
324 320 .na
325 321 \fB\fB>\fR\fI name\fR\fR
326 322 .ad
327 323 .RS 13n
↓ open down ↓ |
8 lines elided |
↑ open up ↑ |
328 324 save an address in register \fIname\fR. \fIname\fR must be a single letter or
329 325 digit.
330 326 .RE
331 327
332 328 .sp
333 329 .ne 2
334 330 .na
335 331 \fB\fB=\fR\fI f\fR\fR
336 332 .ad
337 333 .RS 13n
338 -display indicator. If \fIf\fR is a legitimate format specifier. then the value
334 +display indicator. If \fIf\fR is a legitimate format specifier, then the value
339 335 of \fBdot\fR is displayed using the format specifier \fIf\fR. See
340 -\fBFormatted\fROutput. Otherwise, assignment is assumed See \fB=\fR.
336 +\fBFormatted Output\fR. Otherwise, assignment is assumed. See \fB=\fR.
341 337 .RE
342 338
343 339 .sp
344 340 .ne 2
345 341 .na
346 342 \fB\fB= [\fR\fIs\fR\fB] [\fR\fIe\fR\fB]\fR\fR
347 343 .ad
348 344 .RS 13n
349 345 assignment indicator. The address pointed to by \fBdot\fR has its contents
350 346 changed to the value of the expression \fIe\fR or to the \fBASCII\fR
351 347 representation of the quoted (") string \fIs\fR. This may be useful for
352 348 changing directory names or \fBASCII\fR file information.
353 349 .RE
354 350
355 351 .sp
356 352 .ne 2
357 353 .na
358 354 \fB\fB=+\fR\fI e\fR\fR
359 355 .ad
360 356 .RS 13n
361 357 incremental assignment. The address pointed to by \fBdot\fR has its contents
362 358 incremented by expression \fIe\fR.
363 359 .RE
364 360
365 361 .sp
↓ open down ↓ |
15 lines elided |
↑ open up ↑ |
366 362 .ne 2
367 363 .na
368 364 \fB\fB=-\fR\fI e\fR\fR
369 365 .ad
370 366 .RS 13n
371 367 decremental assignment. The address pointed to by \fBdot\fR has its contents
372 368 decremented by expression \fIe\fR.
373 369 .RE
374 370
375 371 .SS "Commands"
376 -.sp
377 372 .LP
378 373 A command must be prefixed by a ':' character. Only enough letters of the
379 374 command to uniquely distinguish it are needed. Multiple commands may be entered
380 375 on one line by separating them by a \fBSPACE,\fR \fBTAB\fR or ';'.
381 376 .sp
382 377 .LP
383 378 In order to view a potentially unmounted disk in a reasonable manner,
384 379 \fBfsdb\fR offers the \fBcd\fR, \fBpwd\fR, \fBls\fR and \fBfind\fR commands.
385 380 The functionality of these commands substantially matches those of its UNIX
386 381 counterparts. See individual commands for details. The '*', '?', and '[-]' wild
387 382 card characters are available.
388 383 .sp
389 384 .ne 2
390 385 .na
391 386 \fB\fBbase=b\fR\fR
392 387 .ad
393 388 .sp .6
394 389 .RS 4n
395 390 display or set base. As stated above, all input and output is governed by the
396 391 current \fBbase\fR. If the \fB=b\fR is omitted, the current \fBbase\fR is
397 392 displayed. Otherwise, the current \fBbase\fR is set to \fIb.\fR Note that this
398 393 is interpreted using the old value of \fBbase\fR, so to ensure correctness use
399 394 the '0', '0t', or '0x' prefix when changing the \fBbase\fR. The default for
400 395 \fBbase\fR is hexadecimal.
401 396 .RE
402 397
403 398 .sp
404 399 .ne 2
405 400 .na
406 401 \fB\fBblock\fR\fR
407 402 .ad
408 403 .sp .6
409 404 .RS 4n
410 405 convert the value of \fBdot\fR to a block address.
411 406 .RE
412 407
413 408 .sp
414 409 .ne 2
415 410 .na
416 411 \fB\fBcd \fR\fIdir\fR\fR
417 412 .ad
418 413 .sp .6
419 414 .RS 4n
420 415 change the current directory to directory \fIdir\fR. The current values of
421 416 \fBinode\fR and \fBdot\fR are also updated. If no \fIdir\fR is specified, then
422 417 change directories to inode \fB2\fR ("/").
423 418 .RE
424 419
425 420 .sp
426 421 .ne 2
427 422 .na
428 423 \fB\fBcg\fR\fR
429 424 .ad
430 425 .sp .6
431 426 .RS 4n
432 427 convert the value of \fBdot\fR to a cylinder group.
433 428 .RE
434 429
435 430 .sp
436 431 .ne 2
437 432 .na
438 433 \fB\fBdirectory\fR\fR
439 434 .ad
440 435 .sp .6
441 436 .RS 4n
442 437 If the current \fBinode\fR is a directory, then the value of \fBdot\fR is
443 438 converted to a directory slot offset in that directory and \fBdot\fR now points
444 439 to this entry.
445 440 .RE
446 441
447 442 .sp
448 443 .ne 2
449 444 .na
450 445 \fB\fBfile\fR\fR
451 446 .ad
452 447 .sp .6
453 448 .RS 4n
454 449 the value of \fBdot\fR is taken as a relative block count from the beginning of
455 450 the file. The value of \fBdot\fR is updated to the first byte of this block.
456 451 .RE
457 452
458 453 .sp
459 454 .ne 2
460 455 .na
461 456 \fB\fBfind\fR \fIdir\fR [ \fB-name\fR \fIn\fR] [\fB-inum\fR \fIi\fR]\fR
462 457 .ad
463 458 .sp .6
464 459 .RS 4n
465 460 find files by name or i-number. \fBfind\fR recursively searches directory
466 461 \fBdir\fR and below for filenames whose i-number matches \fIi\fR or whose name
467 462 matches pattern \fIn\fR. Note that only one of the two options (-name or -inum)
468 463 may be used at one time. Also, the -print is not needed or accepted.
469 464 .RE
470 465
471 466 .sp
472 467 .ne 2
473 468 .na
474 469 \fB\fBfill\fR\fI=p\fR\fR
475 470 .ad
476 471 .sp .6
477 472 .RS 4n
478 473 fill an area of disk with pattern \fIp\fR. The area of disk is delimited by
479 474 \fBdot\fR and \fBcount\fR.
480 475 .RE
481 476
482 477 .sp
483 478 .ne 2
484 479 .na
485 480 \fB\fBfragment\fR\fR
486 481 .ad
487 482 .sp .6
488 483 .RS 4n
489 484 convert the value of \fIdot\fR to a fragment address. The only difference
490 485 between the \fBfragment\fR command and the \fBblock\fR command is the amount
491 486 that is able to be displayed.
492 487 .RE
493 488
494 489 .sp
495 490 .ne 2
496 491 .na
497 492 \fB\fBinode\fR\fR
498 493 .ad
499 494 .sp .6
500 495 .RS 4n
501 496 convert the value of \fIdot\fR to an inode address. If successful, the current
502 497 value of \fBinode\fR will be updated as well as the value of \fIdot\fR. As a
503 498 convenient shorthand, if ':inode' appears at the beginning of the line, the
504 499 value of \fIdot\fR is set to the current \fBinode\fR and that inode is
505 500 displayed in inode format.
506 501 .RE
507 502
508 503 .sp
509 504 .ne 2
510 505 .na
511 506 \fB\fBlog_chk\fR\fR
512 507 .ad
513 508 .sp .6
514 509 .RS 4n
515 510 run through the valid log entries without printing any information and verify
516 511 the layout.
517 512 .RE
518 513
519 514 .sp
520 515 .ne 2
521 516 .na
522 517 \fB\fBlog_delta\fR\fR
523 518 .ad
524 519 .sp .6
525 520 .RS 4n
526 521 count the number of deltas into the log, using the value of dot as an offset
527 522 into the log. No checking is done to make sure that offset is within the
528 523 head/tail offsets.
529 524 .RE
530 525
531 526 .sp
532 527 .ne 2
533 528 .na
534 529 \fB\fBlog_head\fR\fR
535 530 .ad
536 531 .sp .6
537 532 .RS 4n
538 533 display the header information about the file system logging. This shows the
539 534 block allocation for the log and the data structures on the disk.
540 535 .RE
541 536
542 537 .sp
543 538 .ne 2
544 539 .na
545 540 \fB\fBlog_otodb\fR\fR
546 541 .ad
547 542 .sp .6
548 543 .RS 4n
549 544 return the physical disk block number, using the value of dot as an offset into
550 545 the log.
551 546 .RE
552 547
553 548 .sp
554 549 .ne 2
555 550 .na
556 551 \fB\fBlog_show\fR\fR
557 552 .ad
558 553 .sp .6
559 554 .RS 4n
560 555 display all deltas between the beginning of the log (BOL) and the end of the
561 556 log (EOL).
562 557 .RE
563 558
564 559 .sp
565 560 .ne 2
566 561 .na
567 562 \fB\fBls\fR\fR
568 563 .ad
569 564 .sp .6
570 565 .RS 4n
571 566 [ \fB-R\fR ] [ \fB-l\fR ] \fIpat1 pat2\fR\|.\|.\|. list directories or files.
572 567 If no file is specified, the current directory is assumed. Either or both of
573 568 the options may be used (but, if used, \fImust\fR be specified before the
574 569 filename specifiers). Also, as stated above, wild card characters are available
575 570 and multiple arguments may be given. The long listing shows only the i-number
↓ open down ↓ |
189 lines elided |
↑ open up ↑ |
576 571 and the name; use the \fBinode\fR command with '?i' to get more information.
577 572 .RE
578 573
579 574 .sp
580 575 .ne 2
581 576 .na
582 577 \fB\fBoverride\fR\fR
583 578 .ad
584 579 .sp .6
585 580 .RS 4n
586 -toggle the value of override. Some error conditions may be overriden if
581 +toggle the value of override. Some error conditions may be overridden if
587 582 override is toggled on.
588 583 .RE
589 584
590 585 .sp
591 586 .ne 2
592 587 .na
593 588 \fB\fBprompt\fR\fI p\fR\fR
594 589 .ad
595 590 .sp .6
596 591 .RS 4n
597 592 change the \fBfsdb\fR prompt to \fIp\fR. \fIp\fR must be surrounded by (")s.
598 593 .RE
599 594
600 595 .sp
601 596 .ne 2
602 597 .na
603 598 \fB\fBpwd\fR\fR
604 599 .ad
605 600 .sp .6
606 601 .RS 4n
607 602 display the current working directory.
608 603 .RE
609 604
610 605 .sp
611 606 .ne 2
612 607 .na
613 608 \fB\fBquit\fR\fR
614 609 .ad
615 610 .sp .6
616 611 .RS 4n
617 612 quit \fBfsdb\fR.
618 613 .RE
619 614
620 615 .sp
621 616 .ne 2
622 617 .na
623 618 \fB\fBsb\fR\fR
624 619 .ad
625 620 .sp .6
626 621 .RS 4n
627 622 the value of \fIdot\fR is taken as a cylinder group number and then converted
628 623 to the address of the superblock in that cylinder group. As a shorthand, ':sb'
629 624 at the beginning of a line will set the value of \fIdot\fR to \fIthe\fR
630 625 superblock and display it in superblock format.
631 626 .RE
632 627
633 628 .sp
634 629 .ne 2
635 630 .na
636 631 \fB\fBshadow\fR\fR
637 632 .ad
638 633 .sp .6
639 634 .RS 4n
640 635 if the current inode is a shadow inode, then the value of \fIdot\fR is set to
641 636 the beginning of the shadow inode data.
642 637 .RE
643 638
644 639 .sp
↓ open down ↓ |
48 lines elided |
↑ open up ↑ |
645 640 .ne 2
646 641 .na
647 642 \fB\fB!\fR\fR
648 643 .ad
649 644 .sp .6
650 645 .RS 4n
651 646 escape to shell
652 647 .RE
653 648
654 649 .SS "Inode Commands"
655 -.sp
656 650 .LP
657 651 In addition to the above commands, there are several commands that deal with
658 652 inode fields and operate directly on the current \fBinode\fR (they still
659 653 require the ':'). They may be used to more easily display or change the
660 654 particular fields. The value of \fIdot\fR is only used by the '\fB:db\fR'
661 655 and '\fB:ib\fR' commands. Upon completion of the command, the value of \fIdot\fR is
662 656 changed to point to that particular field. For example,
663 657 .sp
664 658 .LP
665 659 \fB> :ln=+1\fR
666 660 .sp
667 661 .LP
668 662 would increment the link count of the current \fBinode\fR and set the value of
669 663 \fIdot\fR to the address of the link count field.
670 664 .sp
671 665 .ne 2
672 666 .na
673 667 \fB\fBat\fR\fR
674 668 .ad
675 669 .RS 7n
676 670 access time.
677 671 .RE
678 672
679 673 .sp
680 674 .ne 2
681 675 .na
682 676 \fB\fBbs\fR\fR
683 677 .ad
684 678 .RS 7n
685 679 block size.
686 680 .RE
687 681
688 682 .sp
689 683 .ne 2
690 684 .na
691 685 \fB\fBct\fR\fR
692 686 .ad
693 687 .RS 7n
694 688 creation time.
695 689 .RE
696 690
697 691 .sp
698 692 .ne 2
699 693 .na
700 694 \fB\fBdb\fR\fR
701 695 .ad
702 696 .RS 7n
703 697 use the current value of \fIdot\fR as a direct block index, where direct blocks
704 698 number from 0 - 11. In order to display the block itself, you need to 'pipe'
705 699 this result into the \fBblock\fR or \fBfragment\fR command. For example,
↓ open down ↓ |
40 lines elided |
↑ open up ↑ |
706 700 .sp
707 701 .in +2
708 702 .nf
709 703 \fB > 1:db:block,20/X\fR
710 704 .fi
711 705 .in -2
712 706 .sp
713 707
714 708 would get the contents of data block field 1 from the inode and convert it to a
715 709 block address. 20 longs are then displayed in hexadecimal. See
716 -\fBFormatted\fROutput\fB\&.\fR
710 +\fBFormatted Output\fR.
717 711 .RE
718 712
719 713 .sp
720 714 .ne 2
721 715 .na
722 716 \fB\fBgid\fR\fR
723 717 .ad
724 718 .RS 7n
725 719 group id.
726 720 .RE
727 721
728 722 .sp
729 723 .ne 2
730 724 .na
731 725 \fB\fBib\fR\fR
732 726 .ad
733 727 .RS 7n
734 728 use the current value of \fIdot\fR as an indirect block index where indirect
735 729 blocks number from 0 - 2. This will only get the indirect block itself (the
736 730 block containing the pointers to the actual blocks). Use the \fBfile\fR command
737 731 and start at block 12 to get to the actual blocks.
738 732 .RE
739 733
740 734 .sp
741 735 .ne 2
742 736 .na
743 737 \fB\fBln\fR\fR
744 738 .ad
745 739 .RS 7n
746 740 link count.
747 741 .RE
748 742
749 743 .sp
750 744 .ne 2
751 745 .na
752 746 \fB\fBmt\fR\fR
753 747 .ad
754 748 .RS 7n
755 749 modification time.
756 750 .RE
757 751
758 752 .sp
759 753 .ne 2
760 754 .na
761 755 \fB\fBmd\fR\fR
762 756 .ad
763 757 .RS 7n
764 758 mode.
765 759 .RE
766 760
767 761 .sp
768 762 .ne 2
769 763 .na
770 764 \fB\fBmaj\fR\fR
771 765 .ad
772 766 .RS 7n
773 767 major device number.
774 768 .RE
775 769
776 770 .sp
777 771 .ne 2
778 772 .na
779 773 \fB\fBmin\fR\fR
780 774 .ad
781 775 .RS 7n
782 776 minor device number.
783 777 .RE
784 778
785 779 .sp
786 780 .ne 2
787 781 .na
788 782 \fB\fBnm\fR\fR
789 783 .ad
790 784 .RS 7n
791 785 although listed here, this command actually operates on the directory name
792 786 field. Once poised at the desired directory entry (using the \fIdirectory\fR
793 787 command), this command will allow you to change or display the directory name.
794 788 For example,
795 789 .sp
796 790 \fB> 7:dir:nm="foo"\fR
797 791 .sp
798 792 will get the \fB7\fRth directory entry of the current \fBinode\fR and change
799 793 its name to foo. Note that names cannot be made larger than the field is set up
800 794 for. If an attempt is made, the string is truncated to fit and a warning
801 795 message to this effect is displayed.
802 796 .RE
803 797
804 798 .sp
805 799 .ne 2
806 800 .na
807 801 \fB\fBsi\fR\fR
808 802 .ad
809 803 .RS 7n
810 804 shadow inode.
811 805 .RE
812 806
813 807 .sp
814 808 .ne 2
815 809 .na
816 810 \fB\fBsz\fR\fR
817 811 .ad
818 812 .RS 7n
819 813 file size.
820 814 .RE
821 815
↓ open down ↓ |
95 lines elided |
↑ open up ↑ |
822 816 .sp
823 817 .ne 2
824 818 .na
825 819 \fB\fBuid\fR\fR
826 820 .ad
827 821 .RS 7n
828 822 user id.
829 823 .RE
830 824
831 825 .SS "Formatted Output"
832 -.sp
833 826 .LP
834 827 There are two styles and many format types. The two styles are structured and
835 828 unstructured. Structured output is used to display inodes, directories,
836 829 superblocks and the like. Unstructured displays raw data. The following shows
837 830 the different ways of displaying:
838 831 .sp
839 832 .ne 2
840 833 .na
841 834 \fB\fB?\fR\fR
842 835 .ad
843 836 .RS 5n
844 837 .sp
845 838 .ne 2
846 839 .na
847 840 \fB\fBc\fR\fR
848 841 .ad
849 842 .RS 5n
850 843 display as cylinder groups
851 844 .RE
852 845
853 846 .sp
854 847 .ne 2
855 848 .na
856 849 \fB\fBi\fR\fR
857 850 .ad
858 851 .RS 5n
859 852 display as inodes
860 853 .RE
861 854
862 855 .sp
863 856 .ne 2
864 857 .na
865 858 \fB\fBd\fR\fR
866 859 .ad
867 860 .RS 5n
868 861 display as directories
869 862 .RE
870 863
871 864 .sp
872 865 .ne 2
873 866 .na
874 867 \fB\fBs\fR\fR
875 868 .ad
876 869 .RS 5n
877 870 display as superblocks
878 871 .RE
879 872
880 873 .sp
881 874 .ne 2
882 875 .na
883 876 \fB\fBS\fR\fR
884 877 .ad
885 878 .RS 5n
886 879 display as shadow inode data
887 880 .RE
888 881
889 882 .RE
890 883
891 884 .sp
892 885 .ne 2
893 886 .na
894 887 \fB\fB/\fR\fR
895 888 .ad
896 889 .RS 5n
897 890 .sp
898 891 .ne 2
899 892 .na
900 893 \fB\fBb\fR\fR
901 894 .ad
902 895 .RS 7n
903 896 display as bytes
904 897 .RE
905 898
906 899 .sp
907 900 .ne 2
908 901 .na
909 902 \fB\fBc\fR\fR
910 903 .ad
911 904 .RS 7n
912 905 display as characters
913 906 .RE
914 907
915 908 .sp
916 909 .ne 2
917 910 .na
918 911 \fB\fBo O\fR\fR
919 912 .ad
920 913 .RS 7n
921 914 display as octal shorts or longs
922 915 .RE
923 916
924 917 .sp
925 918 .ne 2
926 919 .na
927 920 \fB\fBd D\fR\fR
928 921 .ad
929 922 .RS 7n
930 923 display as decimal shorts or longs
931 924 .RE
932 925
933 926 .sp
934 927 .ne 2
935 928 .na
936 929 \fB\fBx X\fR\fR
937 930 .ad
938 931 .RS 7n
939 932 display as hexadecimal shorts or longs
940 933 .RE
941 934
942 935 The format specifier immediately follows the '/' or '?' character. The values
943 936 displayed by '/b' and all '?' formats are displayed in the current \fBbase\fR.
944 937 Also, \fBtype\fR is appropriately updated upon completion.
945 938 .RE
946 939
947 940 .SH EXAMPLES
948 941 .LP
949 942 \fBExample 1 \fRDisplaying in Decimal
950 943 .sp
951 944 .LP
952 945 The following command displays \fB2010\fR in decimal (use of \fBfsdb\fR as a
953 946 calculator for complex arithmetic):
954 947
955 948 .sp
956 949 .in +2
957 950 .nf
958 951 > 2000+400%(20+20)=D
959 952 .fi
960 953 .in -2
961 954 .sp
962 955
963 956 .LP
964 957 \fBExample 2 \fRDisplaying an i-number in Inode Format
965 958 .sp
966 959 .LP
967 960 The following command displays i-number \fB386\fR in an inode format. This now
968 961 becomes the current \fBinode\fR:
969 962
970 963 .sp
971 964 .in +2
972 965 .nf
973 966 > 386:ino?i
974 967 .fi
975 968 .in -2
976 969 .sp
977 970
978 971 .LP
979 972 \fBExample 3 \fRChanging the Link Count
980 973 .sp
981 974 .LP
982 975 The following command changes the link count for the current \fBinode\fR to
983 976 \fB4\fR:
984 977
985 978 .sp
986 979 .in +2
987 980 .nf
988 981 > :ln=4
989 982 .fi
990 983 .in -2
991 984 .sp
992 985
993 986 .LP
994 987 \fBExample 4 \fRIncrementing the Link Count
995 988 .sp
996 989 .LP
997 990 The following command increments the link count by \fB1\fR:
998 991
999 992 .sp
1000 993 .in +2
1001 994 .nf
1002 995 > :ln=+1
1003 996 .fi
1004 997 .in -2
1005 998 .sp
1006 999
1007 1000 .LP
1008 1001 \fBExample 5 \fRDisplaying the Creation Time
1009 1002 .sp
1010 1003 .LP
1011 1004 The following command displays the creation time as a hexadecimal long:
1012 1005
1013 1006 .sp
1014 1007 .in +2
1015 1008 .nf
1016 1009 > :ct=X
1017 1010 .fi
1018 1011 .in -2
1019 1012 .sp
1020 1013
1021 1014 .LP
1022 1015 \fBExample 6 \fRDisplaying the Modification Time
1023 1016 .sp
1024 1017 .LP
1025 1018 The following command displays the modification time in time format:
1026 1019
1027 1020 .sp
1028 1021 .in +2
1029 1022 .nf
1030 1023 > :mt=t
1031 1024 .fi
1032 1025 .in -2
1033 1026 .sp
1034 1027
1035 1028 .LP
1036 1029 \fBExample 7 \fRDisplaying in ASCII
1037 1030 .sp
1038 1031 .LP
1039 1032 The following command displays in \fBASCII,\fR block zero of the file
1040 1033 associated with the current \fBinode\fR:
1041 1034
1042 1035 .sp
1043 1036 .in +2
1044 1037 .nf
1045 1038 > 0:file/c
1046 1039 .fi
1047 1040 .in -2
1048 1041 .sp
1049 1042
1050 1043 .LP
1051 1044 \fBExample 8 \fRDisplaying the First Block's Worth of Directorty Entries
1052 1045 .sp
1053 1046 .LP
1054 1047 The following command displays the first block's worth of directory entries for
1055 1048 the root inode of this file system. It will stop prematurely if the \fBEOF\fR
1056 1049 is reached:
1057 1050
1058 1051 .sp
1059 1052 .in +2
1060 1053 .nf
1061 1054 > 2:ino,*?d
1062 1055 .fi
1063 1056 .in -2
1064 1057 .sp
1065 1058
1066 1059 .LP
1067 1060 \fBExample 9 \fRDisplaying Changes to the Current Inode
1068 1061 .sp
1069 1062 .LP
1070 1063 The following command displays changes the current inode to that associated
1071 1064 with the \fB5\fRth directory entry (numbered from zero) of the current
1072 1065 \fBinode\fR. The first logical block of the file is then displayed in
1073 1066 \fBASCII\fR:
1074 1067
1075 1068 .sp
1076 1069 .in +2
1077 1070 .nf
1078 1071 > 5:dir:inode; 0:file,*/c
1079 1072 .fi
1080 1073 .in -2
1081 1074 .sp
1082 1075
1083 1076 .LP
1084 1077 \fBExample 10 \fRDisplaying the Superblock
1085 1078 .sp
1086 1079 .LP
1087 1080 The following command displays the superblock of this file system:
1088 1081
1089 1082 .sp
1090 1083 .in +2
1091 1084 .nf
1092 1085 > :sb
1093 1086 .fi
1094 1087 .in -2
1095 1088 .sp
1096 1089
1097 1090 .LP
1098 1091 \fBExample 11 \fRDisplaying the Cylinder Group
1099 1092 .sp
1100 1093 .LP
1101 1094 The following command displays cylinder group information and summary for
1102 1095 cylinder group \fB1\fR:
1103 1096
1104 1097 .sp
1105 1098 .in +2
1106 1099 .nf
1107 1100 > 1:cg?c
1108 1101 .fi
1109 1102 .in -2
1110 1103 .sp
1111 1104
1112 1105 .LP
1113 1106 \fBExample 12 \fRChanging the i-number
1114 1107 .sp
1115 1108 .LP
1116 1109 The following command changes the i-number for the seventh directory slot in
1117 1110 the root directory to \fB3\fR:
1118 1111
1119 1112 .sp
1120 1113 .in +2
1121 1114 .nf
1122 1115 > 2:inode; 7:dir=3
1123 1116 .fi
1124 1117 .in -2
1125 1118 .sp
1126 1119
1127 1120 .LP
1128 1121 \fBExample 13 \fRDisplaying as Directory Entries
1129 1122 .sp
1130 1123 .LP
1131 1124 The following command displays the third block of the current \fBinode\fR as
1132 1125 directory entries:
1133 1126
1134 1127 .sp
1135 1128 .in +2
1136 1129 .nf
1137 1130 > 2:db:block,*?d
1138 1131 .fi
1139 1132 .in -2
1140 1133 .sp
1141 1134
1142 1135 .LP
1143 1136 \fBExample 14 \fRChanging the Name Field
1144 1137 .sp
1145 1138 .LP
1146 1139 The following command changes the name field in the directory slot to
1147 1140 \fIname\fR:
1148 1141
1149 1142 .sp
1150 1143 .in +2
1151 1144 .nf
1152 1145 > 7:dir:nm="name"
1153 1146 .fi
1154 1147 .in -2
1155 1148 .sp
1156 1149
1157 1150 .LP
1158 1151 \fBExample 15 \fRGetting and Filling Elements
1159 1152 .sp
1160 1153 .LP
1161 1154 The following command gets fragment \fB3c3\fR and fill \fB20\fR \fBtype\fR
1162 1155 elements with \fB0x20\fR:
1163 1156
1164 1157 .sp
1165 1158 .in +2
1166 1159 .nf
1167 1160 > 3c3:fragment,20:fill=0x20
1168 1161 .fi
1169 1162 .in -2
1170 1163 .sp
1171 1164
1172 1165 .LP
1173 1166 \fBExample 16 \fRSetting the Contents of an Address
1174 1167 .sp
1175 1168 .LP
1176 1169 The following command sets the contents of address \fB2050\fR to
1177 1170 \fB0xffffffff\fR. \fB0xffffffff\fR may be truncated depending on the current
1178 1171 \fBtype\fR:
1179 1172
1180 1173 .sp
1181 1174 .in +2
1182 1175 .nf
1183 1176 > 2050=0xffff
1184 1177 .fi
1185 1178 .in -2
1186 1179 .sp
1187 1180
1188 1181 .LP
1189 1182 \fBExample 17 \fRPlacing ASCII
1190 1183 .sp
1191 1184 .LP
1192 1185 The following command places the \fBASCII\fR for the string at \fB1c92434\fR:
1193 1186
1194 1187 .sp
1195 1188 .in +2
1196 1189 .nf
1197 1190 > 1c92434="this is some text"
1198 1191 .fi
1199 1192 .in -2
1200 1193 .sp
1201 1194
1202 1195 .LP
1203 1196 \fBExample 18 \fRDisplaying Shadow Inode Data
1204 1197 .sp
1205 1198 .LP
1206 1199 The following command displays all of the shadow inode data in the shadow inode
1207 1200 associated with the root inode of this file system:
↓ open down ↓ |
365 lines elided |
↑ open up ↑ |
1208 1201
1209 1202 .sp
1210 1203 .in +2
1211 1204 .nf
1212 1205 > 2:ino:si:ino;0:shadow,*?S
1213 1206 .fi
1214 1207 .in -2
1215 1208 .sp
1216 1209
1217 1210 .SH SEE ALSO
1218 -.sp
1219 1211 .LP
1220 1212 \fBclri\fR(1M), \fBfsck_ufs\fR(1M), \fBdir_ufs\fR(4), \fBattributes\fR(5),
1221 1213 \fBufs\fR(7FS)
1222 1214 .SH WARNINGS
1223 -.sp
1224 1215 .LP
1225 1216 Since \fBfsdb\fR reads the disk raw, extreme caution is advised in determining
1226 1217 its availability of \fBfsdb\fR on the system. Suggested permissions are 600 and
1227 1218 owned by bin.
1228 1219 .SH NOTES
1229 -.sp
1230 1220 .LP
1231 1221 The old command line syntax for clearing i-nodes using the ufs-specific
1232 1222 \fB\&'-z i-number'\fR option is still supported by the new debugger, though it
1233 1223 is obsolete and will be removed in a future release. Use of this flag will
1234 1224 result in correct operation, but an error message will be printed warning of
1235 1225 the impending obsolesence of this option to the command. The equivalent
1236 1226 functionality is available using the more flexible \fBclri\fR(1M) command.
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX