Путеводитель по Руководству Linux

  User  |  Syst  |  Libr  |  Device  |  Files  |  Other  |  Admin  |  Head  |



   od.1p    ( 1 )

файлы дампа в различных форматах (dump files in various formats)

Расширенное описание (Extended description)

The od utility shall copy sequentially each input file to
       standard output, transforming the input data according to the
       output types specified by the -t option or the -bcdosx options.
       If no output type is specified, the default output shall be as if
       -t oS had been specified.

The number of bytes transformed by the output type specifier c may be variable depending on the LC_CTYPE category.

The default number of bytes transformed by output type specifiers d, f, o, u, and x corresponds to the various C-language types as follows. If the c99 compiler is present on the system, these specifiers shall correspond to the sizes used by default in that compiler. Otherwise, these sizes may vary among systems that conform to POSIX.1‐2008.

* For the type specifier characters d, o, u, and x, the default number of bytes shall correspond to the size of the underlying implementation's basic integer type. For these specifier characters, the implementation shall support values of the optional number of bytes to be converted corresponding to the number of bytes in the C-language types char, short, int, and long. These numbers can also be specified by an application as the characters 'C', 'S', 'I', and 'L', respectively. The implementation shall also support the values 1, 2, 4, and 8, even if it provides no C-Language types of those sizes. The implementation shall support the decimal value corresponding to the C-language type long long. The byte order used when interpreting numeric values is implementation-defined, but shall correspond to the order in which a constant of the corresponding type is stored in memory on the system.

* For the type specifier character f, the default number of bytes shall correspond to the number of bytes in the underlying implementation's basic double precision floating- point data type. The implementation shall support values of the optional number of bytes to be converted corresponding to the number of bytes in the C-language types float, double, and long double. These numbers can also be specified by an application as the characters 'F', 'D', and 'L', respectively.

The type specifier character a specifies that bytes shall be interpreted as named characters from the International Reference Version (IRV) of the ISO/IEC 646:1991 standard. Only the least significant seven bits of each byte shall be used for this type specification. Bytes with the values listed in the following table shall be written using the corresponding names for those characters.

Table: Named Characters in od

┌─────────────┬──────────────┬───────────────────┬──────────────┐ │Value Name Value Name Value Name Value Name │ ├─────────────┼──────────────┼───────────────────┼──────────────┤ │\000 nul │ \001 soh │ \002 stx │ \003 etx │ │\004 eot │ \005 enq │ \006 ack │ \007 bel │ │\010 bs │ \011 ht │ \012 lf or nl* │ \013 vt │ │\014 ff │ \015 cr │ \016 so │ \017 si │ │\020 dle │ \021 dc1 │ \022 dc2 │ \023 dc3 │ │\024 dc4 │ \025 nak │ \026 syn │ \027 etb │ │\030 can │ \031 em │ \032 sub │ \033 esc │ │\034 fs │ \035 gs │ \036 rs │ \037 us │ │\040 sp │ \177 del │ │ │ └─────────────┴──────────────┴───────────────────┴──────────────┘ Note: The "\012" value may be written either as lf or nl.

The type specifier character c specifies that bytes shall be interpreted as characters specified by the current setting of the LC_CTYPE locale category. Characters listed in the table in the Base Definitions volume of POSIX.1‐2017, Chapter 5, File Format Notation ('\\', '\a', '\b', '\f', '\n', '\r', '\t', '\v') shall be written as the corresponding escape sequences, except that <backslash> shall be written as a single <backslash> and a NUL shall be written as '\0'. Other non-printable characters shall be written as one three-digit octal number for each byte in the character. Printable multi-byte characters shall be written in the area corresponding to the first byte of the character; the two-character sequence "**" shall be written in the area corresponding to each remaining byte in the character, as an indication that the character is continued. When either the -j skip or -N count option is specified along with the c type specifier, and this results in an attempt to start or finish in the middle of a multi-byte character, the result is implementation-defined.

The input data shall be manipulated in blocks, where a block is defined as a multiple of the least common multiple of the number of bytes transformed by the specified output types. If the least common multiple is greater than 16, the results are unspecified. Each input block shall be written as transformed by each output type, one per written line, in the order that the output types were specified. If the input block size is larger than the number of bytes transformed by the output type, the output type shall sequentially transform the parts of the input block, and the output from each of the transformations shall be separated by one or more <blank> characters.

If, as a result of the specification of the -N option or end-of- file being reached on the last input file, input data only partially satisfies an output type, the input shall be extended sufficiently with null bytes to write the last byte of the input.

Unless -A n is specified, the first output line produced for each input block shall be preceded by the input offset, cumulative across input files, of the next byte to be written. The format of the input offset is unspecified; however, it shall not contain any <blank> characters, shall start at the first character of the output line, and shall be followed by one or more <blank> characters. In addition, the offset of the byte following the last byte written shall be written after all the input data has been processed, but shall not be followed by any <blank> characters.

If no -A option is specified, the input offset base is unspecified.