InnerhalbNach weiteren Dokumenten suchenSupport-Ressourcen | Dieses Buch im PDF-Format herunterladen (8966 KB)
fsdb_udfs(1M)Name | Synopsis | Description | Options | Usage | Examples | Attributes | See Also Name
Synopsisfsdb [-F] udfs [generic_option] [-o specific_option] special DescriptionThe fsdb_udfs command is an interactive tool that can be used to patch up a damaged udfs file system. fsdb_udfs has conversions to translate block and i-numbers into their corresponding disk addresses. Mnemonic offsets to access different parts of an inode are also included. Mnemonic offsets greatly simplify the process of correcting control block entries or descending the file system tree. fsdb contains several error-checking routines to verify inode and block addresses. These can be disabled if necessary by invoking fsdb with the -o option or by using the o command. fsdb reads one block at a time, and therefore works with raw as well as block I/O devices. A buffer management routine is used to retain commonly used blocks of data in order to reduce the number of read system calls. All assignment operations result in an immediate write-through of the corresponding block. In order to modify any portion of the disk, fsdb must be invoked with the -w option. Wherever possible, adb-like syntax has been adopted to promote the use of fsdb through familiarity. OptionsUsage
Numbers are considered hexadecimal by default. The user has control over how data is to be displayed or accepted. The base command displays or sets the input and output base. Once set, all input defaults to this base and all output displays in this base. The base can be overriden temporarily for input by preceding hexadecimal numbers by 0x, preceding decimal numbers with a 0t, or octal numbers with a 0. Hexadecimal numbers beginning with a-f or A -F must be preceded with a 0x to distinguish them from commands. Disk addressing by fsdb is at the byte level. However, fsdb offers many commands to convert a desired inode, directory entry, block, and so forth, to a byte address. After the address has been calculated, fsdb records the result in the current address (dot). Several global values are maintained by fsdb: Most commands use the preset value of dot in their execution. For example,
first sets the value of dot (.) to 2, colon (:), signifies the start of a command, and the inode command sets inode to 2. A count is specified after a comma (,). Once set, count remains at this value until a new command is encountered that resets the value back to 1 (the default). So, if
is entered, 400 hex longs are listed from 2000, and when completed, the value of dot is 2000 + 400 * sizeof (long). If a RETURN is then entered, the output routine uses the current values of dot, count, and type and displays 400 more hex longs. An asterisk (*) causes the entire block to be displayed. An example showing several commands and the use of RETURN would be:
or
The two examples are synonymous for getting to the first directory entry of the root of the file system. Once there, subsequently entering a RETURN, plus (+), or minus (-) advances to subsequent entries. Notice that
or
is again synonymous. ExpressionsThe following symbols are recognized by fsdb: CommandsA command must be prefixed by a colon (:). Only enough letters of the command to uniquely distinguish it are needed. Multiple commands can be entered on one line by separating them by a SPACE, TAB, or semicolon (;). To view a potentially unmounted disk in a reasonable manner, fsdb supports the cd, pwd, ls, and find commands. The functionality of each of these commands basically matches that of its UNIX counterpart. See cd(1), pwd(1),ls(1), andfind(1) for details. The *, ,, ?, and - wildcard characters are also supported. The following commands are supported: Inode CommandsIn addition to the above commands, several other commands deal with inode fields and operate directly on the current inode (they still require the colon (:). They can be used to more easily display or change the particular fields. The value of dot is only used by the :db and :ib commands. Upon completion of the command, the value of dot is changed so that it points to that particular field. For example,
increments the link count of the current inode and sets the value of dot to the address of the link count field. The following inode commands are supported: Formatted OutputFormatted output comes in two styles and many format types. The two styles of formatted output are: structured and unstructured. Structured output is used to display inodes, directories, and so forth. Unstructured output displays raw data. Format specifiers are preceded by the slash (/) or question mark (?) character. type is updated as necessary upon completion. The following format specifiers are preceded by the ? character: The following format specifiers are preceded by the / character: ExamplesExample 1 Using fsdb as a calculator for complex arithmeticThe following command displays 2010 in decimal format, and is an example of using fsdb as a calculator for complex arithmetic.
Example 2 Using fsdb to display an i-number in idode fomatThe following command displays the i-number 386 in inode format.386 becomes the current inode.
Example 3 Using fsdb to change the link countThe following command changes the link count for the current inode to 4.
Example 4 Using fsdb to increment the link countThe following command increments the link count by 1.
Example 5 Using fsdb to display the creation time as a hexadecimal longThe following command displays the creation time as a hexadecimal long.
Example 6 Using fsdb to display the modification time in time formatThe following command displays the modification time in time format.
Example 7 Using fsdb to display in ASCIIThe following command displays, in ASCII, block 0 of the file associated with the current inode.
Example 8 Using fsdb to display the directory enteries for the root inodeThe following command displays the first block's directory entries for the root inode of this file system. This command stops prematurely if the EOF is reached.
Example 9 Using fsdb to change the current inodeThe following command changes the current inode to that associated with the 5th directory entry (numbered from 0) of the current inode. The first logical block of the file is then displayed in ASCII.
Example 10 Using fsdb to change the i-numberThe following command changes the i-number for the 7th directory slot in the root directory to 3.
Example 11 Using fsdb to change the name fieldThe following command changes the name field in the directory slot to name.
Example 12 Using fsdb to display the a blockThe following command displays the 3rd block of the current inode as directory entries. Example 13 Using fsdb to set the contents of addressThe following command sets the contents of address 2050 to 0xffffffff. 0xffffffff can be truncated, depending on the current type.
Example 14 Using fsdb to place an ASCII string at an addressThe following command places the ASCII string this is some text at address 1c92434.
AttributesSee attributes(5) for descriptions of the following attributes:
See AlsoSunOS 5.10 Last Revised 11 Jun 1999Name | Synopsis | Description | Options | Usage | Examples | Attributes | See Also |
|||||||||||||||||||||||||