Merge illumos-gate
[unleashed/lotheac.git] / share / man / man8 / fsdb_ufs.8
blobcfe2cebee373b1fbb6d89011bb4145f119da23eb
1 '\" te
2 .\"  Copyright (c) 1988 Regents of the University
3 .\" of California.  All rights reserved.  Copyright (c) 2003 Sun Microsystems,
4 .\" Inc.  All Rights Reserved.
5 .TH FSDB_UFS 8 "Apr 14, 2003"
6 .SH NAME
7 fsdb_ufs \- ufs file system debugger
8 .SH SYNOPSIS
9 .LP
10 .nf
11 \fBfsdb\fR \fB-F\fR ufs [\fIgeneric_options\fR] [\fIspecific_options\fR] \fIspecial\fR
12 .fi
14 .SH DESCRIPTION
15 .LP
16 The \fBfsdb_ufs\fR command is an interactive tool that can be used to patch up
17 a damaged \fBUFS\fR file system. It has conversions to translate block and
18 i-numbers into their corresponding disk addresses. Also included are mnemonic
19 offsets to access different parts of an inode. These greatly simplify the
20 process of correcting control block entries or descending the file system tree.
21 .sp
22 .LP
23 \fBfsdb\fR contains several error-checking routines to verify inode and block
24 addresses. These can be disabled if necessary by invoking \fBfsdb\fR with the
25 \fB-o\fR option or by the use of the \fBo\fR command.
26 .sp
27 .LP
28 \fBfsdb\fR reads a block at a time and will therefore work with raw as well as
29 block \fBI/O\fR devices. A buffer management routine is used to retain commonly
30 used blocks of data in order to reduce the number of read system calls. All
31 assignment operations result in an immediate write-through of the corresponding
32 block. Note that in order to modify any portion of the disk, \fBfsdb\fR must be
33 invoked with the \fBw\fR option.
34 .sp
35 .LP
36 Wherever possible, \fBadb-\fRlike syntax was adopted to promote the use of
37 \fBfsdb\fR through familiarity.
38 .SH OPTIONS
39 .LP
40 The following option is supported:
41 .sp
42 .ne 2
43 .na
44 \fB\fB-o\fR\fR
45 .ad
46 .RS 6n
47 Specify \fBUFS\fR file system specific options. These options can be any
48 combination of the following separated by commas (with no intervening spaces).
49 The options available are:
50 .sp
51 .ne 2
52 .na
53 \fB\fB?\fR\fR
54 .ad
55 .RS 14n
56 Display usage
57 .RE
59 .sp
60 .ne 2
61 .na
62 \fB\fBo\fR\fR
63 .ad
64 .RS 14n
65 Override some error conditions
66 .RE
68 .sp
69 .ne 2
70 .na
71 \fB\fBp='string'\fR\fR
72 .ad
73 .RS 14n
74 set prompt to string
75 .RE
77 .sp
78 .ne 2
79 .na
80 \fB\fBw\fR\fR
81 .ad
82 .RS 14n
83 open for write
84 .RE
86 .RE
88 .SH USAGE
89 .LP
90 Numbers are considered hexadecimal by default. However, the user has control
91 over how data is to be displayed or accepted. The \fBbase\fR command will
92 display or set the input/output base. Once set, all input will default to this
93 base and all output will be shown in this base. The base can be overridden
94 temporarily for input by preceding hexadecimal numbers with \&'\fB0x\fR',
95 preceding decimal numbers with '\fB0t\fR', or octal numbers with '\fB0\fR'.
96 Hexadecimal numbers beginning with \fBa-f\fR or \fBA-F\fR must be preceded with
97 \&'\fB0x\fR' to distinguish them from commands.
98 .sp
99 .LP
100 Disk addressing by \fBfsdb\fR is at the byte level. However, \fBfsdb\fR offers
101 many commands to convert a desired inode, directory entry, block, superblock
102 and so forth to a byte address. Once the address has been calculated,
103 \fBfsdb\fR will record the result in dot (\fB\&.\fR).
106 Several global values are maintained by \fBfsdb\fR:
107 .RS +4
109 .ie t \(bu
110 .el o
111 the current base (referred to as \fBbase\fR),
113 .RS +4
115 .ie t \(bu
116 .el o
117 the current address (referred to as \fBdot\fR),
119 .RS +4
121 .ie t \(bu
122 .el o
123 the current inode (referred to as \fBinode\fR),
125 .RS +4
127 .ie t \(bu
128 .el o
129 the current count (referred to as \fBcount\fR),
131 .RS +4
133 .ie t \(bu
134 .el o
135 and the current type (referred to as \fBtype\fR).
139 Most commands use the preset value of \fBdot\fR in their execution. For
140 example,
143 \fB> 2:inode\fR
146 will first set the value of \fBdot\fR to 2, ':', will alert the start of a
147 command, and the \fBinode\fR command will set \fBinode\fR to 2. A count is
148 specified after a ','. Once set, \fBcount\fR will remain at this value until a
149 new command is encountered which will then reset the value back to 1 (the
150 default). So, if
153 \fB> 2000,400/X\fR
156 is typed, 400 hex longs are listed from 2000, and when completed, the value of
157 \fBdot\fR will be \fB2000 + 400 * sizeof (long)\fR. If a  \fBRETURN\fR is then
158 typed, the output routine will use the current values of \fBdot\fR,
159 \fBcount\fR, and \fBtype\fR and display 400 more hex longs. A '*' will cause
160 the entire block to be displayed.
163 End of fragment, block and file are maintained by \fBfsdb\fR. When displaying
164 data as fragments or blocks, an error message will be displayed when the end of
165 fragment or block is reached. When displaying data using the \fBdb\fR,
166 \fBib\fR, \fBdirectory\fR, or \fBfile\fR commands an error message is displayed
167 if the end of file is reached. This is mainly needed to avoid passing the end
168 of a directory or file and getting unknown and unwanted results.
171 An example showing several commands and the use of  \fBRETURN\fR would be:
173 .in +2
175 \fB> 2:ino; 0:dir?d\fR
176       or
177 \fB> 2:ino; 0:db:block?d\fR
179 .in -2
184 The two examples are synonymous for getting to the first directory entry of the
185 root of the file system. Once there, any subsequent  \fBRETURN\fR (or +, -)
186 will advance to subsequent entries. Note that
188 .in +2
190 \fB> 2:inode; :ls\fR
191       or
192 \fB> :ls /\fR
194 .in -2
199 is again synonymous.
200 .SS "Expressions"
202 The symbols recognized by \fBfsdb\fR are:
204 .ne 2
206 \fB\fBRETURN\fR\fR
208 .RS 13n
209 update the value of \fBdot\fR by the current value of \fBtype\fR and display
210 using the current value of \fBcount\fR.
214 .ne 2
216 \fB\fB#\fR\fR
218 .RS 13n
219 numeric expressions may be composed of +, -, *, and % operators (evaluated left
220 to right) and may use parentheses. Once evaluated, the value of \fBdot\fR is
221 updated.
225 .ne 2
227 \fB\fB,\fR\fI count\fR\fR
229 .RS 13n
230 count indicator. The global value of \fBcount\fR will be updated to
231 \fBcount\fR. The value of \fBcount\fR will remain until a new command is run. A
232 count specifier of '*' will attempt to show a \fIblocks's\fR worth of
233 information. The default for \fBcount\fR is 1.
237 .ne 2
239 \fB\fB?\fR\fI f\fR\fR
241 .RS 13n
242 display in structured style with format specifier \fIf\fR. See
243 \fBFormatted Output\fR.
247 .ne 2
249 \fB\fB/\fR\fI f\fR\fR
251 .RS 13n
252 display in unstructured style with format specifier \fIf\fR. See
253 \fBFormatted Output\fR.
257 .ne 2
259 \fB\fB\&.\fR\fR
261 .RS 13n
262 the value of \fBdot\fR.
266 .ne 2
268 \fB\fB+\fR\fIe\fR\fR
270 .RS 13n
271 increment the value of \fBdot\fR by the expression \fIe.\fR The amount actually
272 incremented is dependent on the size of \fBtype\fR:
274 \fBdot = dot + e * sizeof (type)\fR
276 The default for \fIe\fR is \fB1\fR.
280 .ne 2
282 \fB\fB-\fR\fIe\fR\fR
284 .RS 13n
285 decrement the value of \fBdot\fR by the expression \fIe\fR. See \fB+\fR.
289 .ne 2
291 \fB\fB*\fR\fIe\fR\fR
293 .RS 13n
294 multiply the value of \fBdot\fR by the expression \fIe.\fR Multiplication and
295 division don't use \fBtype\fR. In the above calculation of \fBdot\fR, consider
296 the \fBsizeof(type)\fR to be \fB1\fR.
300 .ne 2
302 \fB\fB%\fR\fIe\fR\fR
304 .RS 13n
305 divide the value of \fBdot\fR by the expression \fIe\fR. See \fB*\fR.
309 .ne 2
311 \fB\fB<\fR\fI name\fR\fR
313 .RS 13n
314 restore an address saved in register \fIname\fR. \fIname\fR must be a single
315 letter or digit.
319 .ne 2
321 \fB\fB>\fR\fI name\fR\fR
323 .RS 13n
324 save an address in register \fIname\fR. \fIname\fR must be a single letter or
325 digit.
329 .ne 2
331 \fB\fB=\fR\fI f\fR\fR
333 .RS 13n
334 display indicator. If \fIf\fR is a legitimate format specifier, then the value
335 of \fBdot\fR is displayed using the format specifier \fIf\fR. See
336 \fBFormatted Output\fR. Otherwise, assignment is assumed. See \fB=\fR.
340 .ne 2
342 \fB\fB= [\fR\fIs\fR\fB] [\fR\fIe\fR\fB]\fR\fR
344 .RS 13n
345 assignment indicator. The address pointed to by \fBdot\fR has its contents
346 changed to the value of the expression \fIe\fR or to the \fBASCII\fR
347 representation of the quoted (") string \fIs\fR. This may be useful for
348 changing directory names or \fBASCII\fR file information.
352 .ne 2
354 \fB\fB=+\fR\fI e\fR\fR
356 .RS 13n
357 incremental assignment. The address pointed to by \fBdot\fR has its contents
358 incremented by expression \fIe\fR.
362 .ne 2
364 \fB\fB=-\fR\fI e\fR\fR
366 .RS 13n
367 decremental assignment. The address pointed to by \fBdot\fR has its contents
368 decremented by expression \fIe\fR.
371 .SS "Commands"
373 A command must be prefixed by a ':' character. Only enough letters of the
374 command to uniquely distinguish it are needed. Multiple commands may be entered
375 on one line by separating them by a  \fBSPACE,\fR \fBTAB\fR or ';'.
378 In order to view a potentially unmounted disk in a reasonable manner,
379 \fBfsdb\fR offers the \fBcd\fR, \fBpwd\fR, \fBls\fR and \fBfind\fR commands.
380 The functionality of these commands substantially matches those of its UNIX
381 counterparts. See individual commands for details. The '*', '?', and '[-]' wild
382 card characters are available.
384 .ne 2
386 \fB\fBbase=b\fR\fR
388 .sp .6
389 .RS 4n
390 display or set base. As stated above, all input and output is governed by the
391 current \fBbase\fR. If the  \fB=b\fR is omitted, the current \fBbase\fR is
392 displayed. Otherwise, the current \fBbase\fR is set to \fIb.\fR Note that this
393 is interpreted using the old value of \fBbase\fR, so to ensure correctness use
394 the '0', '0t', or '0x' prefix when changing the \fBbase\fR. The default for
395 \fBbase\fR is hexadecimal.
399 .ne 2
401 \fB\fBblock\fR\fR
403 .sp .6
404 .RS 4n
405 convert the value of \fBdot\fR to a block address.
409 .ne 2
411 \fB\fBcd \fR\fIdir\fR\fR
413 .sp .6
414 .RS 4n
415 change the current directory to directory \fIdir\fR. The current values of
416 \fBinode\fR and \fBdot\fR are also updated. If no \fIdir\fR is specified, then
417 change directories to inode \fB2\fR ("/").
421 .ne 2
423 \fB\fBcg\fR\fR
425 .sp .6
426 .RS 4n
427 convert the value of \fBdot\fR to a cylinder group.
431 .ne 2
433 \fB\fBdirectory\fR\fR
435 .sp .6
436 .RS 4n
437 If the current \fBinode\fR is a directory, then the value of \fBdot\fR is
438 converted to a directory slot offset in that directory and \fBdot\fR now points
439 to this entry.
443 .ne 2
445 \fB\fBfile\fR\fR
447 .sp .6
448 .RS 4n
449 the value of \fBdot\fR is taken as a relative block count from the beginning of
450 the file. The value of \fBdot\fR is updated to the first byte of this block.
454 .ne 2
456 \fB\fBfind\fR \fIdir\fR [ \fB-name\fR \fIn\fR] [\fB-inum\fR \fIi\fR]\fR
458 .sp .6
459 .RS 4n
460 find files by name or i-number. \fBfind\fR recursively searches directory
461 \fBdir\fR and below for filenames whose i-number matches \fIi\fR or whose name
462 matches pattern \fIn\fR. Note that only one of the two options (-name or -inum)
463 may be used at one time. Also, the -print is not needed or accepted.
467 .ne 2
469 \fB\fBfill\fR\fI=p\fR\fR
471 .sp .6
472 .RS 4n
473 fill an area of disk with pattern \fIp\fR. The area of disk is delimited by
474 \fBdot\fR and \fBcount\fR.
478 .ne 2
480 \fB\fBfragment\fR\fR
482 .sp .6
483 .RS 4n
484 convert the value of \fIdot\fR to a fragment address. The only difference
485 between the \fBfragment\fR command and the \fBblock\fR command is the amount
486 that is able to be displayed.
490 .ne 2
492 \fB\fBinode\fR\fR
494 .sp .6
495 .RS 4n
496 convert the value of \fIdot\fR to an inode address. If successful, the current
497 value of \fBinode\fR will be updated as well as the value of \fIdot\fR. As a
498 convenient shorthand, if ':inode' appears at the beginning of the line, the
499 value of \fIdot\fR is set to the current \fBinode\fR and that inode is
500 displayed in inode format.
504 .ne 2
506 \fB\fBlog_chk\fR\fR
508 .sp .6
509 .RS 4n
510 run through the valid log entries without printing any information and verify
511 the layout.
515 .ne 2
517 \fB\fBlog_delta\fR\fR
519 .sp .6
520 .RS 4n
521 count the number of deltas into the log, using the value of dot as an offset
522 into the log. No checking is done to make sure that offset is within the
523 head/tail offsets.
527 .ne 2
529 \fB\fBlog_head\fR\fR
531 .sp .6
532 .RS 4n
533 display the header information about the file system logging. This shows the
534 block allocation for the log and the data structures on the disk.
538 .ne 2
540 \fB\fBlog_otodb\fR\fR
542 .sp .6
543 .RS 4n
544 return the physical disk block number, using the value of dot as an offset into
545 the log.
549 .ne 2
551 \fB\fBlog_show\fR\fR
553 .sp .6
554 .RS 4n
555 display all deltas between  the beginning of the log (BOL) and the end of the
556 log (EOL).
560 .ne 2
562 \fB\fBls\fR\fR
564 .sp .6
565 .RS 4n
566 [ \fB-R\fR ] [ \fB-l\fR ] \fIpat1 pat2\fR\|.\|.\|. list directories or files.
567 If no file is specified, the current directory is assumed. Either or both of
568 the options may be used (but, if used, \fImust\fR be specified before the
569 filename specifiers). Also, as stated above, wild card characters are available
570 and multiple arguments may be given. The long listing shows only the i-number
571 and the name; use the \fBinode\fR command with '?i' to get more information.
575 .ne 2
577 \fB\fBoverride\fR\fR
579 .sp .6
580 .RS 4n
581 toggle the value of override. Some error conditions may be overridden if
582 override is toggled on.
586 .ne 2
588 \fB\fBprompt\fR\fI p\fR\fR
590 .sp .6
591 .RS 4n
592 change the \fBfsdb\fR prompt to \fIp\fR. \fIp\fR must be surrounded by (")s.
596 .ne 2
598 \fB\fBpwd\fR\fR
600 .sp .6
601 .RS 4n
602 display the current working directory.
606 .ne 2
608 \fB\fBquit\fR\fR
610 .sp .6
611 .RS 4n
612 quit \fBfsdb\fR.
616 .ne 2
618 \fB\fBsb\fR\fR
620 .sp .6
621 .RS 4n
622 the value of \fIdot\fR is taken as a cylinder group number and then converted
623 to the address of the superblock in that cylinder group. As a shorthand, ':sb'
624 at the beginning of a line will set the value of \fIdot\fR to \fIthe\fR
625 superblock and display it in superblock format.
629 .ne 2
631 \fB\fBshadow\fR\fR
633 .sp .6
634 .RS 4n
635 if the current inode is a shadow inode, then the value of \fIdot\fR is set to
636 the beginning of the shadow inode data.
640 .ne 2
642 \fB\fB!\fR\fR
644 .sp .6
645 .RS 4n
646 escape to shell
649 .SS "Inode Commands"
651 In addition to the above commands, there are several commands that deal with
652 inode fields and operate directly on the current \fBinode\fR (they still
653 require the ':'). They may be used to more easily display or change the
654 particular fields. The value of \fIdot\fR is only used by the '\fB:db\fR'
655 and '\fB:ib\fR' commands. Upon completion of the command, the value of \fIdot\fR is
656 changed to point to that particular field. For example,
659 \fB> :ln=+1\fR
662 would increment the link count of the current \fBinode\fR and set the value of
663 \fIdot\fR to the address of the link count field.
665 .ne 2
667 \fB\fBat\fR\fR
669 .RS 7n
670 access time.
674 .ne 2
676 \fB\fBbs\fR\fR
678 .RS 7n
679 block size.
683 .ne 2
685 \fB\fBct\fR\fR
687 .RS 7n
688 creation time.
692 .ne 2
694 \fB\fBdb\fR\fR
696 .RS 7n
697 use the current value of \fIdot\fR as a direct block index, where direct blocks
698 number from 0 - 11. In order to display the block itself, you need to 'pipe'
699 this result into the \fBblock\fR or \fBfragment\fR command. For example,
701 .in +2
703 \fB     > 1:db:block,20/X\fR
705 .in -2
708 would get the contents of data block field 1 from the inode and convert it to a
709 block address. 20 longs are then displayed in hexadecimal. See
710 \fBFormatted Output\fR.
714 .ne 2
716 \fB\fBgid\fR\fR
718 .RS 7n
719 group id.
723 .ne 2
725 \fB\fBib\fR\fR
727 .RS 7n
728 use the current value of \fIdot\fR as an indirect block index where indirect
729 blocks number from 0 - 2. This will only get the indirect block itself (the
730 block containing the pointers to the actual blocks). Use the \fBfile\fR command
731 and start at block 12 to get to the actual blocks.
735 .ne 2
737 \fB\fBln\fR\fR
739 .RS 7n
740 link count.
744 .ne 2
746 \fB\fBmt\fR\fR
748 .RS 7n
749 modification time.
753 .ne 2
755 \fB\fBmd\fR\fR
757 .RS 7n
758 mode.
762 .ne 2
764 \fB\fBmaj\fR\fR
766 .RS 7n
767 major device number.
771 .ne 2
773 \fB\fBmin\fR\fR
775 .RS 7n
776 minor device number.
780 .ne 2
782 \fB\fBnm\fR\fR
784 .RS 7n
785 although listed here, this command actually operates on the directory name
786 field. Once poised at the desired directory entry (using the \fIdirectory\fR
787 command), this command will allow you to change or display the directory name.
788 For example,
790 \fB> 7:dir:nm="foo"\fR
792 will get the \fB7\fRth directory entry of the current \fBinode\fR and change
793 its name to foo. Note that names cannot be made larger than the field is set up
794 for. If an attempt is made, the string is truncated to fit and a warning
795 message to this effect is displayed.
799 .ne 2
801 \fB\fBsi\fR\fR
803 .RS 7n
804 shadow inode.
808 .ne 2
810 \fB\fBsz\fR\fR
812 .RS 7n
813 file size.
817 .ne 2
819 \fB\fBuid\fR\fR
821 .RS 7n
822 user id.
825 .SS "Formatted Output"
827 There are two styles and many format types. The two styles are structured and
828 unstructured. Structured output is used to display inodes, directories,
829 superblocks and the like. Unstructured displays raw data. The following shows
830 the different ways of displaying:
832 .ne 2
834 \fB\fB?\fR\fR
836 .RS 5n
838 .ne 2
840 \fB\fBc\fR\fR
842 .RS 5n
843 display as cylinder groups
847 .ne 2
849 \fB\fBi\fR\fR
851 .RS 5n
852 display as inodes
856 .ne 2
858 \fB\fBd\fR\fR
860 .RS 5n
861 display as directories
865 .ne 2
867 \fB\fBs\fR\fR
869 .RS 5n
870 display as superblocks
874 .ne 2
876 \fB\fBS\fR\fR
878 .RS 5n
879 display as shadow inode data
885 .ne 2
887 \fB\fB/\fR\fR
889 .RS 5n
891 .ne 2
893 \fB\fBb\fR\fR
895 .RS 7n
896 display as bytes
900 .ne 2
902 \fB\fBc\fR\fR
904 .RS 7n
905 display as characters
909 .ne 2
911 \fB\fBo O\fR\fR
913 .RS 7n
914 display as octal shorts or longs
918 .ne 2
920 \fB\fBd D\fR\fR
922 .RS 7n
923 display as decimal shorts or longs
927 .ne 2
929 \fB\fBx X\fR\fR
931 .RS 7n
932 display as hexadecimal shorts or longs
935 The format specifier immediately follows the '/' or '?' character. The values
936 displayed by '/b' and all '?' formats are displayed in the current \fBbase\fR.
937 Also, \fBtype\fR is appropriately updated upon completion.
940 .SH EXAMPLES
942 \fBExample 1 \fRDisplaying in Decimal
945 The following command displays \fB2010\fR in decimal (use of \fBfsdb\fR as a
946 calculator for complex arithmetic):
949 .in +2
951 > 2000+400%(20+20)=D
953 .in -2
957 \fBExample 2 \fRDisplaying an i-number in Inode Format
960 The following command displays i-number \fB386\fR in an inode format. This now
961 becomes the current \fBinode\fR:
964 .in +2
966 > 386:ino?i
968 .in -2
972 \fBExample 3 \fRChanging the Link Count
975 The following command changes the link count for the current \fBinode\fR to
976 \fB4\fR:
979 .in +2
981 > :ln=4
983 .in -2
987 \fBExample 4 \fRIncrementing the Link Count
990 The following command increments the link count by \fB1\fR:
993 .in +2
995 > :ln=+1
997 .in -2
1001 \fBExample 5 \fRDisplaying the Creation Time
1004 The following command displays the creation time as a hexadecimal long:
1007 .in +2
1009 > :ct=X
1011 .in -2
1015 \fBExample 6 \fRDisplaying the Modification Time
1018 The following command displays the modification time in time format:
1021 .in +2
1023 > :mt=t
1025 .in -2
1029 \fBExample 7 \fRDisplaying in ASCII
1032 The following command displays in \fBASCII,\fR block zero of the file
1033 associated with the current \fBinode\fR:
1036 .in +2
1038 > 0:file/c
1040 .in -2
1044 \fBExample 8 \fRDisplaying the First Block's Worth of Directorty Entries
1047 The following command displays the first block's worth of directory entries for
1048 the root inode of this file system. It will stop prematurely if the \fBEOF\fR
1049 is reached:
1052 .in +2
1054 > 2:ino,*?d
1056 .in -2
1060 \fBExample 9 \fRDisplaying Changes to the Current Inode
1063 The following command displays changes the current inode to that associated
1064 with the \fB5\fRth directory entry (numbered from zero) of the current
1065 \fBinode\fR. The first logical block of the file is then displayed in
1066 \fBASCII\fR:
1069 .in +2
1071 > 5:dir:inode; 0:file,*/c
1073 .in -2
1077 \fBExample 10 \fRDisplaying the Superblock
1080 The following command displays the superblock of this file system:
1083 .in +2
1085 > :sb
1087 .in -2
1091 \fBExample 11 \fRDisplaying the Cylinder Group
1094 The following command displays cylinder group information and summary for
1095 cylinder group \fB1\fR:
1098 .in +2
1100 > 1:cg?c
1102 .in -2
1106 \fBExample 12 \fRChanging the i-number
1109 The following command changes the i-number for the seventh directory slot in
1110 the root directory to \fB3\fR:
1113 .in +2
1115 > 2:inode; 7:dir=3
1117 .in -2
1121 \fBExample 13 \fRDisplaying as Directory Entries
1124 The following command displays the third block of the current \fBinode\fR as
1125 directory entries:
1128 .in +2
1130 > 2:db:block,*?d
1132 .in -2
1136 \fBExample 14 \fRChanging the Name Field
1139 The following command changes the name field in the directory slot to
1140 \fIname\fR:
1143 .in +2
1145 > 7:dir:nm="name"
1147 .in -2
1151 \fBExample 15 \fRGetting and Filling Elements
1154 The following command gets fragment \fB3c3\fR and fill \fB20\fR \fBtype\fR
1155 elements with \fB0x20\fR:
1158 .in +2
1160 > 3c3:fragment,20:fill=0x20
1162 .in -2
1166 \fBExample 16 \fRSetting the Contents of an Address
1169 The following command sets the contents of address \fB2050\fR to
1170 \fB0xffffffff\fR. \fB0xffffffff\fR may be truncated depending on the current
1171 \fBtype\fR:
1174 .in +2
1176 > 2050=0xffff
1178 .in -2
1182 \fBExample 17 \fRPlacing ASCII
1185 The following command places the \fBASCII\fR for the string at \fB1c92434\fR:
1188 .in +2
1190 > 1c92434="this is some text"
1192 .in -2
1196 \fBExample 18 \fRDisplaying Shadow Inode Data
1199 The following command displays all of the shadow inode data in the shadow inode
1200 associated with the root inode of this file system:
1203 .in +2
1205 > 2:ino:si:ino;0:shadow,*?S
1207 .in -2
1210 .SH SEE ALSO
1212 \fBclri\fR(8), \fBfsck_ufs\fR(8), \fBdir_ufs\fR(4), \fBattributes\fR(5),
1213 \fBufs\fR(7FS)
1214 .SH WARNINGS
1216 Since \fBfsdb\fR reads the disk raw, extreme caution is advised in determining
1217 its availability of \fBfsdb\fR on the system. Suggested permissions are 600 and
1218 owned by bin.
1219 .SH NOTES
1221 The old command line syntax for clearing i-nodes using the ufs-specific
1222 \fB\&'-z i-number'\fR option is still supported by the new debugger, though it
1223 is obsolete and will be removed in a future release. Use of this flag will
1224 result in correct operation, but an error message will be printed warning of
1225 the impending obsolesence of this option to the command. The equivalent
1226 functionality is available using the more flexible \fBclri\fR(8) command.