74 .RS 12n
75 Open for write.
76 .RE
77
78 .sp
79 .ne 2
80 .na
81 \fB?\fR
82 .ad
83 .RS 12n
84 Display usage.
85 .RE
86
87 .RE
88
89 .SH USAGE
90 .LP
91 Numbers are considered hexadecimal by default. The user has control over how
92 data is to be displayed or accepted. The \fBbase\fR command displays or sets
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
95 by preceding hexadecimal numbers by \fB0x\fR, preceding decimal numbers with a
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
98 distinguish them from commands.
99 .sp
100 .LP
101 Disk addressing by \fBfsdb\fR is at the byte level. However, \fBfsdb\fR offers
102 many commands to convert a desired inode, directory entry, block, and so forth,
103 to a byte address. After the address has been calculated, \fBfsdb\fR records
104 the result in the current address (\fBdot\fR).
105 .sp
106 .LP
107 Several global values are maintained by \fBfsdb\fR\fB\fR:
108 .RS +4
109 .TP
110 .ie t \(bu
111 .el o
112 Current base (referred to as \fBbase\fR)
113 .RE
114 .RS +4
115 .TP
116 .ie t \(bu
117 .el o
454
455 .sp
456 .ne 2
457 .na
458 \fBfile\fR
459 .ad
460 .sp .6
461 .RS 4n
462 Set the value of dot as a relative block count from the beginning of the file.
463 The value of dot is updated to the first byte of this block.
464 .RE
465
466 .sp
467 .ne 2
468 .na
469 \fBfind \fIdir\fR [\fB-name\fR \fIn\fR] | [\fB-inum\fR\fI i\fR]\fR
470 .ad
471 .sp .6
472 .RS 4n
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
475 pattern \fIn\fR. Only one of the two options (\fB-name\fR or \fB-inum\fR) can
476 be used at one time. The find \fB-print\fR is not necessary or accepted.
477 .RE
478
479 .sp
480 .ne 2
481 .na
482 \fBfill=\fIp\fR\fR
483 .ad
484 .sp .6
485 .RS 4n
486 Fill an area of disk with pattern \fIp\fR. The area of disk is delimited by dot
487 and count.
488 .RE
489
490 .sp
491 .ne 2
492 .na
493 \fBinode\fR
494 .ad
809 Display as hexadecimal shorts or longs.
810 .RE
811
812 .SH EXAMPLES
813 .LP
814 \fBExample 1 \fRUsing fsdb as a calculator for complex arithmetic
815 .sp
816 .LP
817 The following command displays \fB2010\fR in decimal format, and is an example
818 of using \fBfsdb\fR as a calculator for complex arithmetic.
819
820 .sp
821 .in +2
822 .nf
823 > 2000+400%(20+20)=D
824 .fi
825 .in -2
826 .sp
827
828 .LP
829 \fBExample 2 \fRUsing fsdb to display an i-number in idode fomat
830 .sp
831 .LP
832 The following command displays the i-number \fB386\fR in inode format.\fB386\fR
833 becomes the current inode.
834
835 .sp
836 .in +2
837 .nf
838 > 386:ino?i
839 .fi
840 .in -2
841 .sp
842
843 .LP
844 \fBExample 3 \fRUsing fsdb to change the link count
845 .sp
846 .LP
847 The following command changes the link count for the current inode to \fB4\fR.
848
849 .sp
|
74 .RS 12n
75 Open for write.
76 .RE
77
78 .sp
79 .ne 2
80 .na
81 \fB?\fR
82 .ad
83 .RS 12n
84 Display usage.
85 .RE
86
87 .RE
88
89 .SH USAGE
90 .LP
91 Numbers are considered hexadecimal by default. The user has control over how
92 data is to be displayed or accepted. The \fBbase\fR command displays or sets
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 overridden temporarily for input
95 by preceding hexadecimal numbers by \fB0x\fR, preceding decimal numbers with a
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
98 distinguish them from commands.
99 .sp
100 .LP
101 Disk addressing by \fBfsdb\fR is at the byte level. However, \fBfsdb\fR offers
102 many commands to convert a desired inode, directory entry, block, and so forth,
103 to a byte address. After the address has been calculated, \fBfsdb\fR records
104 the result in the current address (\fBdot\fR).
105 .sp
106 .LP
107 Several global values are maintained by \fBfsdb\fR\fB\fR:
108 .RS +4
109 .TP
110 .ie t \(bu
111 .el o
112 Current base (referred to as \fBbase\fR)
113 .RE
114 .RS +4
115 .TP
116 .ie t \(bu
117 .el o
454
455 .sp
456 .ne 2
457 .na
458 \fBfile\fR
459 .ad
460 .sp .6
461 .RS 4n
462 Set the value of dot as a relative block count from the beginning of the file.
463 The value of dot is updated to the first byte of this block.
464 .RE
465
466 .sp
467 .ne 2
468 .na
469 \fBfind \fIdir\fR [\fB-name\fR \fIn\fR] | [\fB-inum\fR\fI i\fR]\fR
470 .ad
471 .sp .6
472 .RS 4n
473 Find files by name or i-number. Recursively searches directory \fIdir\fR and
474 below for file names whose i-number matches \fBi\fR or whose name matches
475 pattern \fIn\fR. Only one of the two options (\fB-name\fR or \fB-inum\fR) can
476 be used at one time. The find \fB-print\fR is not necessary or accepted.
477 .RE
478
479 .sp
480 .ne 2
481 .na
482 \fBfill=\fIp\fR\fR
483 .ad
484 .sp .6
485 .RS 4n
486 Fill an area of disk with pattern \fIp\fR. The area of disk is delimited by dot
487 and count.
488 .RE
489
490 .sp
491 .ne 2
492 .na
493 \fBinode\fR
494 .ad
809 Display as hexadecimal shorts or longs.
810 .RE
811
812 .SH EXAMPLES
813 .LP
814 \fBExample 1 \fRUsing fsdb as a calculator for complex arithmetic
815 .sp
816 .LP
817 The following command displays \fB2010\fR in decimal format, and is an example
818 of using \fBfsdb\fR as a calculator for complex arithmetic.
819
820 .sp
821 .in +2
822 .nf
823 > 2000+400%(20+20)=D
824 .fi
825 .in -2
826 .sp
827
828 .LP
829 \fBExample 2 \fRUsing fsdb to display an i-number in inode fomat
830 .sp
831 .LP
832 The following command displays the i-number \fB386\fR in inode format.\fB386\fR
833 becomes the current inode.
834
835 .sp
836 .in +2
837 .nf
838 > 386:ino?i
839 .fi
840 .in -2
841 .sp
842
843 .LP
844 \fBExample 3 \fRUsing fsdb to change the link count
845 .sp
846 .LP
847 The following command changes the link count for the current inode to \fB4\fR.
848
849 .sp
|