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_udfs.1m
+++ new/usr/src/man/man1m/fsdb_udfs.1m
1 1 '\" te
2 2 .\" Copyright (c) 1999 Sun Microsystems, Inc. All Rights Reserved.
3 3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
5 5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 6 .TH FSDB_UDFS 1M "Nov 26, 2017"
7 7 .SH NAME
8 8 fsdb_udfs \- udfs file system debugger
9 9 .SH SYNOPSIS
10 10 .LP
11 11 .nf
12 12 \fBfsdb \fR [\fB-F\fR] udfs [\fIgeneric_option\fR] [\fB-o \fR\fIspecific_option\fR] \fIspecial\fR
13 13 .fi
14 14
15 15 .SH DESCRIPTION
16 16 .LP
17 17 The \fBfsdb_udfs\fR command is an interactive tool that can be used to patch up
18 18 a damaged \fBudfs\fR file system. \fBfsdb_udfs\fR has conversions to translate
19 19 block and i-numbers into their corresponding disk addresses. Mnemonic offsets
20 20 to access different parts of an inode are also included. Mnemonic offsets
21 21 greatly simplify the process of correcting control block entries or descending
22 22 the file system tree.
23 23 .sp
24 24 .LP
25 25 \fBfsdb\fR contains several error-checking routines to verify inode and block
26 26 addresses. These can be disabled if necessary by invoking \fBfsdb\fR with the
27 27 \fB-o\fR option or by using the \fBo\fR command.
28 28 .sp
29 29 .LP
30 30 \fBfsdb\fR reads one block at a time, and therefore works with raw as well as
31 31 block \fBI/O\fR devices. A buffer management routine is used to retain commonly
32 32 used blocks of data in order to reduce the number of read system calls. All
33 33 assignment operations result in an immediate write-through of the corresponding
34 34 block. In order to modify any portion of the disk, \fBfsdb\fR must be invoked
35 35 with the \fB-w\fR option.
36 36 .sp
37 37 .LP
38 38 Wherever possible, \fBadb\fR-like syntax has been adopted to promote the use of
39 39 \fBfsdb\fR through familiarity.
40 40 .SH OPTIONS
41 41 .LP
42 42 The following options are supported:
43 43 .sp
44 44 .ne 2
45 45 .na
46 46 \fB\fB-o\fR \fIspecific_option\fR\fR
47 47 .ad
48 48 .RS 22n
49 49 Specify \fBudfs\fR file system specific options in a comma-separated list with
50 50 no intervening spaces. The following specific options are supported:
51 51 .sp
52 52 .ne 2
53 53 .na
54 54 \fBo\fR
55 55 .ad
56 56 .RS 12n
57 57 Override some error conditions.
58 58 .RE
59 59
60 60 .sp
61 61 .ne 2
62 62 .na
63 63 \fBp=\fIstring\fR\fR
64 64 .ad
65 65 .RS 12n
66 66 Set prompt to \fIstring\fR.
67 67 .RE
68 68
69 69 .sp
70 70 .ne 2
71 71 .na
72 72 \fBw\fR
73 73 .ad
74 74 .RS 12n
75 75 Open for write.
76 76 .RE
77 77
78 78 .sp
79 79 .ne 2
80 80 .na
81 81 \fB?\fR
82 82 .ad
83 83 .RS 12n
↓ open down ↓ |
83 lines elided |
↑ open up ↑ |
84 84 Display usage.
85 85 .RE
86 86
87 87 .RE
88 88
89 89 .SH USAGE
90 90 .LP
91 91 Numbers are considered hexadecimal by default. The user has control over how
92 92 data is to be displayed or accepted. The \fBbase\fR command displays or sets
93 93 the input and output base. Once set, all input defaults to this base and all
94 -output displays in this base. The base can be overriden temporarily for input
94 +output displays in this base. The base can be overridden temporarily for input
95 95 by preceding hexadecimal numbers by \fB0x\fR, preceding decimal numbers with a
96 96 \fB0t\fR, or octal numbers with a \fB0\fR. Hexadecimal numbers beginning with
97 -\fBa\fR-\fBf\fR or \fBA\fR -\fBF\fR must be preceded with a \fB0x\fR to
97 +\fBa\fR-\fBf\fR or \fBA\fR-\fBF\fR must be preceded with a \fB0x\fR to
98 98 distinguish them from commands.
99 99 .sp
100 100 .LP
101 101 Disk addressing by \fBfsdb\fR is at the byte level. However, \fBfsdb\fR offers
102 102 many commands to convert a desired inode, directory entry, block, and so forth,
103 103 to a byte address. After the address has been calculated, \fBfsdb\fR records
104 104 the result in the current address (\fBdot\fR).
105 105 .sp
106 106 .LP
107 107 Several global values are maintained by \fBfsdb\fR\fB\fR:
108 108 .RS +4
109 109 .TP
110 110 .ie t \(bu
111 111 .el o
112 112 Current base (referred to as \fBbase\fR)
113 113 .RE
114 114 .RS +4
115 115 .TP
116 116 .ie t \(bu
117 117 .el o
118 118 Current address (referred to as \fBdot\fR)
119 119 .RE
120 120 .RS +4
121 121 .TP
122 122 .ie t \(bu
123 123 .el o
124 124 Current inode (referred to as \fBinode\fR)
125 125 .RE
126 126 .RS +4
127 127 .TP
128 128 .ie t \(bu
129 129 .el o
130 130 Current count (referred to as \fBcount\fR)
131 131 .RE
132 132 .RS +4
133 133 .TP
134 134 .ie t \(bu
135 135 .el o
136 136 Current type (referred to as \fBtype\fR)
137 137 .RE
138 138 .sp
139 139 .LP
140 140 Most commands use the preset value of \fBdot\fR in their execution. For
141 141 example,
142 142 .sp
143 143 .in +2
144 144 .nf
145 145 > 2:inode
146 146 .fi
147 147 .in -2
148 148 .sp
149 149
150 150 .sp
151 151 .LP
152 152 first sets the value of dot (\fB\&.\fR) to \fB2\fR, colon (\fB:\fR), signifies
153 153 the start of a command, and the \fBinode\fR command sets \fBinode\fR to
154 154 \fB2\fR. A count is specified after a comma (\fB,\fR). Once set, count remains
155 155 at this value until a new command is encountered that resets the value back to
156 156 \fB1\fR (the default).
157 157 .sp
158 158 .LP
159 159 So, if
160 160 .sp
161 161 .in +2
162 162 .nf
163 163 > 2000,400/X
164 164 .fi
165 165 .in -2
166 166 .sp
167 167
168 168 .sp
169 169 .LP
170 170 is entered, \fB400\fR hex longs are listed from \fB2000\fR, and when completed,
171 171 the value of dot is \fB 2000 + 400 * sizeof\fR (long). If a RETURN is then
172 172 entered, the output routine uses the current values of \fBdot\fR, \fBcount\fR,
173 173 and \fBtype\fR and displays \fB400 \fRmore hex longs. An asterisk (\fB*\fR)
174 174 causes the entire block to be displayed. An example showing several commands
175 175 and the use of RETURN would be:
176 176 .sp
177 177 .in +2
178 178 .nf
179 179 > 2:ino; 0:dir?d
180 180 .fi
181 181 .in -2
182 182 .sp
183 183
184 184 .sp
185 185 .LP
186 186 or
187 187 .sp
188 188 .in +2
189 189 .nf
190 190 > 2:ino; 0:db:block?d
191 191 .fi
192 192 .in -2
193 193 .sp
194 194
195 195 .sp
196 196 .LP
197 197 The two examples are synonymous for getting to the first directory entry of the
198 198 root of the file system. Once there, subsequently entering a RETURN, plus
199 199 (\fB+\fR), or minus (\fB-\fR) advances to subsequent entries. Notice that
200 200 .sp
201 201 .in +2
202 202 .nf
203 203 > 2:inode; :ls
204 204 .fi
205 205 .in -2
206 206 .sp
207 207
208 208 .sp
209 209 .LP
210 210 or
211 211 .sp
212 212 .in +2
213 213 .nf
214 214 > :ls /
215 215 .fi
216 216 .in -2
217 217 .sp
218 218
219 219 .sp
220 220 .LP
221 221 is again synonymous.
222 222 .SS "Expressions"
223 223 .LP
224 224 The following symbols are recognized by \fBfsdb\fR:
225 225 .sp
226 226 .ne 2
227 227 .na
228 228 \fBRETURN\fR
229 229 .ad
230 230 .RS 13n
231 231 Update the value of dot by the current value of \fItype\fR and \fIdisplay\fR
232 232 using the current value of \fIcount\fR.
233 233 .RE
234 234
235 235 .sp
236 236 .ne 2
237 237 .na
238 238 \fB\fI#\fR\fR
239 239 .ad
240 240 .RS 13n
241 241 Update the value of dot by specifying a numeric expression. Specify numeric
242 242 expressions using addition, subtraction, multiplication, and division
243 243 operators ( \fB+\fR, \fB-\fR, \fB*\fR, and \fB%\fR). Numeric expressions are
244 244 evaluated from left to right and can use parentheses. After evaluation, the
245 245 value of dot is updated.
246 246 .RE
247 247
248 248 .sp
249 249 .ne 2
250 250 .na
251 251 \fB, \fIcount\fR\fR
252 252 .ad
253 253 .RS 13n
254 254 Update the count indicator. The global value of \fIcount\fR is updated to
255 255 \fIcount\fR. The value of \fIcount\fR remains until a new command is run. A
256 256 \fIcount\fR specifier of \fB*\fR attempts to show a blocks's worth of
257 257 information. The default for \fIcount\fR is \fB1\fR.
258 258 .RE
259 259
260 260 .sp
261 261 .ne 2
262 262 .na
263 263 \fB? \fI f\fR\fR
264 264 .ad
265 265 .RS 13n
266 266 Display in structured style with format specifier \fBf\fR. See \fBFormatted
267 267 Output\fR.
268 268 .RE
269 269
270 270 .sp
271 271 .ne 2
272 272 .na
273 273 \fB/ \fIf\fR\fR
274 274 .ad
275 275 .RS 13n
276 276 Display in unstructured style with format specifier \fBf\fR. See \fBFormatted
277 277 Output\fR.
278 278 .RE
279 279
280 280 .sp
281 281 .ne 2
282 282 .na
283 283 \fB\&.\fR
284 284 .ad
285 285 .RS 13n
286 286 Display the value of dot.
287 287 .RE
288 288
289 289 .sp
290 290 .ne 2
291 291 .na
292 292 \fB+\fIe\fR\fR
293 293 .ad
294 294 .RS 13n
295 295 Increment the value of dot by the expression \fIe\fR. The amount actually
296 296 incremented is dependent on the size of type: \fBdot = dot + \fR\fIe \fR\fB*
297 297 \fR\fBsizeof\fR (\fItype\fR) The default for \fIe\fR is \fB1\fR.
298 298 .RE
299 299
300 300 .sp
301 301 .ne 2
302 302 .na
303 303 \fB\(mi\fIe\fR\fR
304 304 .ad
305 305 .RS 13n
306 306 Decrement the value of dot by the expression \fIe \fR. See \fB+\fR.
307 307 .RE
308 308
309 309 .sp
310 310 .ne 2
311 311 .na
312 312 \fB*\fIe\fR\fR
313 313 .ad
314 314 .RS 13n
315 315 Multiply the value of dot by the expression \fIe\fR. Multiplication and
316 316 division don't use \fItype\fR. In the above calculation of dot, consider the
317 317 \fBsizeof\fR (\fItype\fR) to be \fB1\fR.
318 318 .RE
319 319
320 320 .sp
321 321 .ne 2
322 322 .na
323 323 \fB%\fIe\fR\fR
324 324 .ad
325 325 .RS 13n
326 326 Divide the value of dot by the expression \fIe\fR. See \fB*\fR.
327 327 .RE
328 328
329 329 .sp
330 330 .ne 2
331 331 .na
332 332 \fB< \fIname\fR\fR
333 333 .ad
334 334 .RS 13n
335 335 Restore an address saved in register \fIname\fR. \fIname\fR must be a single
336 336 letter or digit.
337 337 .RE
338 338
339 339 .sp
340 340 .ne 2
341 341 .na
342 342 \fB> \fIname\fR\fR
343 343 .ad
344 344 .RS 13n
345 345 Save an address in register \fIname\fR. \fIname\fR must be a single letter or
346 346 digit.
347 347 .RE
348 348
349 349 .sp
350 350 .ne 2
351 351 .na
352 352 \fB= \fIf\fR\fR
353 353 .ad
354 354 .RS 13n
355 355 Display indicator. If \fIf\fR is a legitimate format specifier (see
356 356 \fBFormatted Output\fR), then the value of dot is displayed using format
357 357 specifier \fIf\fR. Otherwise, assignment is assumed. See \fB= [s] [e]\fR.
358 358 .RE
359 359
360 360 .sp
361 361 .ne 2
362 362 .na
363 363 \fB= [\fIs\fR] [\fIe\fR]\fR
364 364 .ad
365 365 .RS 13n
366 366 Change the value of dot using an assignment indicator. The address pointed to
367 367 by dot has its contents changed to the value of the expression \fIe\fR or to
368 368 the \fBASCII\fR representation of the quoted (\fB"\fR) string \fIs\fR. This can
369 369 be useful for changing directory names or \fBASCII\fR file information.
370 370 .RE
371 371
372 372 .sp
373 373 .ne 2
374 374 .na
375 375 \fB=+ \fIe\fR\fR
376 376 .ad
377 377 .RS 13n
378 378 Change the value of dot using an incremental assignment. The address pointed to
379 379 by dot has its contents incremented by expression \fIe\fR.
380 380 .RE
381 381
382 382 .sp
383 383 .ne 2
384 384 .na
385 385 \fB=- e\fR
386 386 .ad
387 387 .RS 13n
388 388 Change the value of dot using a decremental assignment. Decrement the contents
389 389 of the address pointed to by dot by expression \fIe\fR.
390 390 .RE
391 391
392 392 .SS "Commands"
393 393 .LP
394 394 A command must be prefixed by a colon (\fB:\fR). Only enough letters of the
395 395 command to uniquely distinguish it are needed. Multiple commands can be entered
396 396 on one line by separating them by a SPACE, TAB, or semicolon (\fB;\fR).
397 397 .sp
398 398 .LP
399 399 To view a potentially unmounted disk in a reasonable manner, \fBfsdb\fR
400 400 supports the \fBcd\fR, \fBpwd\fR, \fBls\fR, and \fBfind\fR commands. The
401 401 functionality of each of these commands basically matches that of its UNIX
402 402 counterpart. See \fBcd\fR(1), \fBpwd\fR(1), \fBls\fR(1), and \fBfind\fR(1) for
403 403 details. The \fB*\fR, \fB,\fR, \fB?\fR, and \fB-\fR wildcard characters are
404 404 also supported.
405 405 .sp
406 406 .LP
407 407 The following commands are supported:
408 408 .sp
409 409 .ne 2
410 410 .na
411 411 \fBbase[=\fIb\fR]\fR
412 412 .ad
413 413 .sp .6
414 414 .RS 4n
415 415 Display or set the base. All input and output is governed by the current base.
416 416 Without the \fB=\fR \fIb\fR, displays the current base. Otherwise, sets the
417 417 current base to \fIb\fR. Base is interpreted using the old value of base, so to
418 418 ensure correctness use the \fB0\fR, \fB0t\fR, or \fB0x\fR prefix when changing
419 419 the base. The default for base is hexadecimal.
420 420 .RE
421 421
422 422 .sp
423 423 .ne 2
424 424 .na
425 425 \fBblock\fR
426 426 .ad
427 427 .sp .6
428 428 .RS 4n
429 429 Convert the value of dot to a block address.
430 430 .RE
431 431
432 432 .sp
433 433 .ne 2
434 434 .na
435 435 \fBcd [\fIdir\fR]\fR
436 436 .ad
437 437 .sp .6
438 438 .RS 4n
439 439 Change the current directory to directory \fIdir\fR. The current values of
440 440 inode and dot are also updated. If \fBdir\fR is not specified, changes
441 441 directories to inode 2, root (\fB/\fR).
442 442 .RE
443 443
444 444 .sp
445 445 .ne 2
446 446 .na
447 447 \fBdirectory\fR
448 448 .ad
449 449 .sp .6
450 450 .RS 4n
451 451 If the current inode is a directory, converts the value of dot to a directory
452 452 slot offset in that directory, and dot now points to this entry.
453 453 .RE
454 454
455 455 .sp
456 456 .ne 2
457 457 .na
458 458 \fBfile\fR
459 459 .ad
460 460 .sp .6
461 461 .RS 4n
462 462 Set the value of dot as a relative block count from the beginning of the file.
463 463 The value of dot is updated to the first byte of this block.
↓ open down ↓ |
356 lines elided |
↑ open up ↑ |
464 464 .RE
465 465
466 466 .sp
467 467 .ne 2
468 468 .na
469 469 \fBfind \fIdir\fR [\fB-name\fR \fIn\fR] | [\fB-inum\fR\fI i\fR]\fR
470 470 .ad
471 471 .sp .6
472 472 .RS 4n
473 473 Find files by name or i-number. Recursively searches directory \fIdir\fR and
474 -below for file names whose i-number matches\fB i\fR or whose name matches
474 +below for file names whose i-number matches \fBi\fR or whose name matches
475 475 pattern \fIn\fR. Only one of the two options (\fB-name\fR or \fB-inum\fR) can
476 476 be used at one time. The find \fB-print\fR is not necessary or accepted.
477 477 .RE
478 478
479 479 .sp
480 480 .ne 2
481 481 .na
482 482 \fBfill=\fIp\fR\fR
483 483 .ad
484 484 .sp .6
485 485 .RS 4n
486 486 Fill an area of disk with pattern \fIp\fR. The area of disk is delimited by dot
487 487 and count.
488 488 .RE
489 489
490 490 .sp
491 491 .ne 2
492 492 .na
493 493 \fBinode\fR
494 494 .ad
495 495 .sp .6
496 496 .RS 4n
497 497 Convert the value of dot to an inode address. If successful, the current value
498 498 of inode is updated as well as the value of dot. As a convenient shorthand, if
499 499 \fB:inode\fR appears at the beginning of the line, the value of dot is set to
500 500 the current inode and that inode is displayed in inode format.
501 501 .RE
502 502
503 503 .sp
504 504 .ne 2
505 505 .na
506 506 \fBls [ \fB-R\fR ] [\fB-l\fR ] \fIpat1\fR \fIpat2\fR...\fR
507 507 .ad
508 508 .sp .6
509 509 .RS 4n
510 510 List directories or files. If no file is specified, the current directory is
511 511 assumed. Either or both of the options can be used (but, if used, must be
512 512 specified before the filename specifiers). Wild card characters are available
513 513 and multiple arguments are acceptable. The long listing shows only the i-number
514 514 and the name; use the inode command with \fB?i\fR to get more information.
515 515 .RE
516 516
517 517 .sp
518 518 .ne 2
519 519 .na
520 520 \fBoverride\fR
521 521 .ad
522 522 .sp .6
523 523 .RS 4n
524 524 Toggle the value of override. Some error conditions might be overridden if
525 525 override is toggled to \fBon\fR.
526 526 .RE
527 527
528 528 .sp
529 529 .ne 2
530 530 .na
531 531 \fBprompt "\fIp\fR"\fR
532 532 .ad
533 533 .sp .6
534 534 .RS 4n
535 535 Change the \fBfsdb\fR prompt to \fIp\fR. \fIp\fR must be enclosed in quotes.
536 536 .RE
537 537
538 538 .sp
539 539 .ne 2
540 540 .na
541 541 \fBpwd\fR
542 542 .ad
543 543 .sp .6
544 544 .RS 4n
545 545 Display the current working directory.
546 546 .RE
547 547
548 548 .sp
549 549 .ne 2
550 550 .na
551 551 \fBquit\fR
552 552 .ad
553 553 .sp .6
554 554 .RS 4n
555 555 Quit \fBfsdb\fR.
556 556 .RE
557 557
558 558 .sp
559 559 .ne 2
560 560 .na
561 561 \fBtag\fR
562 562 .ad
563 563 .sp .6
564 564 .RS 4n
565 565 Convert the value of dot and if this is a valid tag, print the volume structure
566 566 according to the tag.
567 567 .RE
568 568
569 569 .sp
570 570 .ne 2
571 571 .na
572 572 \fB!\fR
573 573 .ad
574 574 .sp .6
575 575 .RS 4n
576 576 Escape to the shell.
577 577 .RE
578 578
579 579 .SS "Inode Commands"
580 580 .LP
581 581 In addition to the above commands, several other commands deal with inode
582 582 fields and operate directly on the current inode (they still require the colon
583 583 (\fB:\fR). They can be used to more easily display or change the particular
584 584 fields. The value of dot is only used by the \fB:db\fR and \fB:ib\fR commands.
585 585 Upon completion of the command, the value of dot is changed so that it points
586 586 to that particular field. For example,
587 587 .sp
588 588 .in +2
589 589 .nf
590 590 > :ln=+1
591 591 .fi
592 592 .in -2
593 593 .sp
594 594
595 595 .sp
596 596 .LP
597 597 increments the link count of the current inode and sets the value of dot to the
598 598 address of the link count field.
599 599 .sp
600 600 .LP
601 601 The following inode commands are supported:
602 602 .sp
603 603 .ne 2
604 604 .na
605 605 \fBat\fR
606 606 .ad
607 607 .RS 8n
608 608 Access time
609 609 .RE
610 610
611 611 .sp
612 612 .ne 2
613 613 .na
614 614 \fBbs\fR
615 615 .ad
616 616 .RS 8n
617 617 Block size
618 618 .RE
619 619
620 620 .sp
621 621 .ne 2
622 622 .na
623 623 \fBct\fR
624 624 .ad
625 625 .RS 8n
626 626 Creation time
627 627 .RE
628 628
629 629 .sp
630 630 .ne 2
631 631 .na
632 632 \fBgid\fR
633 633 .ad
634 634 .RS 8n
635 635 Group id
636 636 .RE
637 637
638 638 .sp
639 639 .ne 2
640 640 .na
641 641 \fBln\fR
642 642 .ad
643 643 .RS 8n
644 644 Link number
645 645 .RE
646 646
647 647 .sp
648 648 .ne 2
649 649 .na
650 650 \fBmt\fR
651 651 .ad
652 652 .RS 8n
653 653 Modification time
654 654 .RE
655 655
656 656 .sp
657 657 .ne 2
658 658 .na
659 659 \fBmd\fR
660 660 .ad
661 661 .RS 8n
662 662 Mode
663 663 .RE
664 664
665 665 .sp
666 666 .ne 2
667 667 .na
668 668 \fBmaj\fR
669 669 .ad
670 670 .RS 8n
671 671 Major device number
672 672 .RE
673 673
674 674 .sp
675 675 .ne 2
676 676 .na
677 677 \fBmin\fR
678 678 .ad
679 679 .RS 8n
680 680 Minor device number
681 681 .RE
682 682
683 683 .sp
684 684 .ne 2
685 685 .na
686 686 \fBnm\fR
687 687 .ad
688 688 .RS 8n
689 689 This command actually operates on the directory name field. Once poised at
690 690 the desired directory entry (using the \fBdirectory\fR command), this command
691 691 allows you to change or display the directory name. For example,
692 692 .sp
693 693 .in +2
694 694 .nf
695 695 > 7:dir:nm="foo"
696 696 .fi
697 697 .in -2
698 698 .sp
699 699
700 700 gets the \fB7\fRth directory entry of the current inode and changes its name to
701 701 \fBfoo\fR. Directory names cannot be made larger than the field allows. If an
702 702 attempt is made to make a directory name larger than the field allows,, the
703 703 string is truncated to fit and a warning message is displayed.
704 704 .RE
705 705
706 706 .sp
707 707 .ne 2
708 708 .na
709 709 \fBsz\fR
710 710 .ad
711 711 .RS 8n
712 712 File size
713 713 .RE
714 714
715 715 .sp
716 716 .ne 2
717 717 .na
718 718 \fBuid\fR
719 719 .ad
720 720 .RS 8n
721 721 User \fBID\fR
722 722 .RE
723 723
724 724 .sp
725 725 .ne 2
726 726 .na
727 727 \fBuniq\fR
728 728 .ad
729 729 .RS 8n
730 730 Unique \fBID\fR
731 731 .RE
732 732
733 733 .SS "Formatted Output"
734 734 .LP
735 735 Formatted output comes in two styles and many format types. The two styles of
736 736 formatted output are: structured and unstructured. Structured output is used to
737 737 display inodes, directories, and so forth. Unstructured output displays raw
738 738 data.
739 739 .sp
740 740 .LP
741 741 Format specifiers are preceded by the slash (\fB/\fR) or question mark
742 742 (\fB?\fR) character. \fItype\fR is updated as necessary upon completion.
743 743 .sp
744 744 .LP
745 745 The following format specifiers are preceded by the \fB?\fR character:
746 746 .sp
747 747 .ne 2
748 748 .na
749 749 \fBi\fR
750 750 .ad
751 751 .RS 5n
752 752 Display as inodes in the current base.
753 753 .RE
754 754
755 755 .sp
756 756 .ne 2
757 757 .na
758 758 \fBd\fR
759 759 .ad
760 760 .RS 5n
761 761 Display as directories in the current base.
762 762 .RE
763 763
764 764 .sp
765 765 .LP
766 766 The following format specifiers are preceded by the \fB/\fR character:
767 767 .sp
768 768 .ne 2
769 769 .na
770 770 \fBb\fR
771 771 .ad
772 772 .RS 9n
773 773 Display as bytes in the current base.
774 774 .RE
775 775
776 776 .sp
777 777 .ne 2
778 778 .na
779 779 \fBc\fR
780 780 .ad
781 781 .RS 9n
782 782 Display as characters.
783 783 .RE
784 784
785 785 .sp
786 786 .ne 2
787 787 .na
788 788 \fBo | O\fR
789 789 .ad
790 790 .RS 9n
791 791 Display as octal shorts or longs.
792 792 .RE
793 793
794 794 .sp
795 795 .ne 2
796 796 .na
797 797 \fBd | D\fR
798 798 .ad
799 799 .RS 9n
800 800 Display as decimal shorts or longs.
801 801 .RE
802 802
803 803 .sp
804 804 .ne 2
805 805 .na
806 806 \fBx | X\fR
807 807 .ad
808 808 .RS 9n
809 809 Display as hexadecimal shorts or longs.
810 810 .RE
811 811
812 812 .SH EXAMPLES
813 813 .LP
814 814 \fBExample 1 \fRUsing fsdb as a calculator for complex arithmetic
815 815 .sp
816 816 .LP
817 817 The following command displays \fB2010\fR in decimal format, and is an example
818 818 of using \fBfsdb\fR as a calculator for complex arithmetic.
↓ open down ↓ |
334 lines elided |
↑ open up ↑ |
819 819
820 820 .sp
821 821 .in +2
822 822 .nf
823 823 > 2000+400%(20+20)=D
824 824 .fi
825 825 .in -2
826 826 .sp
827 827
828 828 .LP
829 -\fBExample 2 \fRUsing fsdb to display an i-number in idode fomat
829 +\fBExample 2 \fRUsing fsdb to display an i-number in inode fomat
830 830 .sp
831 831 .LP
832 832 The following command displays the i-number \fB386\fR in inode format.\fB386\fR
833 833 becomes the current inode.
834 834
835 835 .sp
836 836 .in +2
837 837 .nf
838 838 > 386:ino?i
839 839 .fi
840 840 .in -2
841 841 .sp
842 842
843 843 .LP
844 844 \fBExample 3 \fRUsing fsdb to change the link count
845 845 .sp
846 846 .LP
847 847 The following command changes the link count for the current inode to \fB4\fR.
848 848
849 849 .sp
850 850 .in +2
851 851 .nf
852 852 > :ln=4
853 853 .fi
854 854 .in -2
855 855 .sp
856 856
857 857 .LP
858 858 \fBExample 4 \fRUsing fsdb to increment the link count
859 859 .sp
860 860 .LP
861 861 The following command increments the link count by \fB1\fR.
862 862
863 863 .sp
864 864 .in +2
865 865 .nf
866 866 > :ln=+1
867 867 .fi
868 868 .in -2
869 869 .sp
870 870
871 871 .LP
872 872 \fBExample 5 \fRUsing fsdb to display the creation time as a hexadecimal long
873 873 .sp
874 874 .LP
875 875 The following command displays the creation time as a hexadecimal long.
876 876
877 877 .sp
878 878 .in +2
879 879 .nf
880 880 > :ct=X
881 881 .fi
882 882 .in -2
883 883 .sp
884 884
885 885 .LP
886 886 \fBExample 6 \fRUsing fsdb to display the modification time in time format
887 887 .sp
888 888 .LP
889 889 The following command displays the modification time in time format.
890 890
891 891 .sp
892 892 .in +2
893 893 .nf
894 894 > :mt=t
895 895 .fi
896 896 .in -2
897 897 .sp
898 898
899 899 .LP
900 900 \fBExample 7 \fRUsing fsdb to display in ASCII
901 901 .sp
902 902 .LP
903 903 The following command displays, in \fBASCII\fR, block \fB0\fR of the file
904 904 associated with the current inode.
905 905
906 906 .sp
907 907 .in +2
908 908 .nf
909 909 > 0:file/c
910 910 .fi
911 911 .in -2
912 912 .sp
913 913
914 914 .LP
915 915 \fBExample 8 \fRUsing fsdb to display the directory enteries for the root inode
916 916 .sp
917 917 .LP
918 918 The following command displays the first block's directory entries for the root
919 919 inode of this file system. This command stops prematurely if the \fBEOF\fR is
920 920 reached.
921 921
922 922 .sp
923 923 .in +2
924 924 .nf
925 925 > 2:ino,*?d
926 926 .fi
927 927 .in -2
928 928 .sp
929 929
930 930 .LP
931 931 \fBExample 9 \fRUsing fsdb to change the current inode
932 932 .sp
933 933 .LP
934 934 The following command changes the current inode to that associated with the
935 935 \fB5\fRth directory entry (numbered from \fB0\fR) of the current inode. The
936 936 first logical block of the file is then displayed in \fBASCII\fR.
937 937
938 938 .sp
939 939 .in +2
940 940 .nf
941 941 > 5:dir:inode; 0:file,*/c
942 942 .fi
943 943 .in -2
944 944 .sp
945 945
946 946 .LP
947 947 \fBExample 10 \fRUsing fsdb to change the i-number
948 948 .sp
949 949 .LP
950 950 The following command changes the i-number for the \fB7\fRth directory slot in
951 951 the root directory to \fB3\fR.
952 952
953 953 .sp
954 954 .in +2
955 955 .nf
956 956 > 2:inode; 7:dir=3
957 957 .fi
958 958 .in -2
959 959 .sp
960 960
961 961 .LP
962 962 \fBExample 11 \fRUsing fsdb to change the name field
963 963 .sp
964 964 .LP
965 965 The following command changes the \fIname\fR field in the directory slot to
966 966 \fBname\fR.
967 967
968 968 .sp
969 969 .in +2
970 970 .nf
971 971 > 7:dir:nm="name"
972 972 .fi
973 973 .in -2
974 974 .sp
975 975
976 976 .LP
977 977 \fBExample 12 \fRUsing fsdb to display the a block
978 978 .sp
979 979 .LP
980 980 The following command displays the \fB3\fRrd block of the current inode as
981 981 directory entries.
982 982
983 983 .LP
984 984 \fBExample 13 \fRUsing fsdb to set the contents of address
985 985 .sp
986 986 .LP
987 987 The following command sets the contents of address \fB2050\fR to
988 988 \fB0xffffffff\fR. \fB0xffffffff\fR can be truncated, depending on the current
989 989 type.
990 990
991 991 .sp
992 992 .in +2
993 993 .nf
994 994 > 2050=0xffff
995 995 .fi
996 996 .in -2
997 997 .sp
998 998
999 999 .LP
1000 1000 \fBExample 14 \fRUsing fsdb to place an ASCII string at an address
1001 1001 .sp
1002 1002 .LP
1003 1003 The following command places the \fBASCII\fR string \fBthis is some text\fR at
1004 1004 address \fB1c92434\fR.
1005 1005
1006 1006 .sp
1007 1007 .in +2
1008 1008 .nf
1009 1009 > 1c92434="this is some text"
1010 1010 .fi
1011 1011 .in -2
1012 1012 .sp
1013 1013
1014 1014 .SH SEE ALSO
1015 1015 .LP
1016 1016 \fBclri\fR(1M), \fBfsck_udfs\fR(1M), \fBdir\fR(4), \fBattributes\fR(5)
↓ open down ↓ |
177 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX