*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> od (1)              
Title
Content
Arch
Section
 

od(1)

Contents


NAME    [Toc]    [Back]

       od - Writes the contents of a file to standard output

SYNOPSIS    [Toc]    [Back]

       od  [-v]  [-Q]  [-A address_base] [-j skip] [-N count] [-t
       type_string...] [file...]

       od [-abBcCdDefFhHiIlLoOpPSvxX]  [-s[number]]  [-w[number]]
       [file...] [+] [offset] [.] [b | B] [label] [.] [b | B]

       The od command reads file (standard input by default), and
       writes the information stored in file to  standard  output
       using the format specified by the first option.  If you do
       not specify  the  first  option,  the  -o  option  is  the
       default.

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       od:  XCU5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

OPTIONS    [Toc]    [Back]

       Format  characters  are as follows: [Tru64 UNIX]  Displays
       quadwords as hexadecimal values. This option applies  only
       to  the  operating  system  for Alpha AXP systems.  [Tru64
       UNIX]  Displays bytes as characters and displays them with
       their  ASCII  names.   If  the  p character is also given,
       bytes with even parity are underlined.   The  P  character
       causes bytes with odd parity to be underlined.  Otherwise,
       parity is ignored.  Specifies the input offset  base  with
       the  single-character  address_base argument.  The characters
 d, o, and x specify that the offset base  be  written
       in  decimal,  octal,  or  hexadecimal,  respectively.  The
       character n specifies that the offset not  be  written  at
       all.   Displays bytes as octal values.  [Tru64 UNIX]  Displays
 short words as  octal  values.   Displays  bytes  as
       characters using the current setting of the LC_CTYPE variable.
  The following nongraphic  characters  appear  as  C
       escape  sequences:  Null  [Tru64  UNIX]  Alarm  (or  bell)
       Backspace Formfeed  Newline  character  Enter  Tab  [Tru64
       UNIX]  Vertical tab

              Other nongraphic characters appear as 3-digit octal
              numbers. Bytes with the parity  bit  set  are  displayed
   in   octal.   [Tru64  UNIX]  Displays  any
              extended characters  as  standard  printable  ASCII
              characters  using  the appropriate character escape
              string.  Displays short words as  unsigned  decimal
              values.    [Tru64  UNIX]  Displays  long  words  as
              unsigned decimal  values.   [Tru64  UNIX]  Displays
              long  words  as  double-precision,  floating-point.
              (Same as -F.)  [Tru64 UNIX]  Displays long words as
              single-precision,      floating-point.       [Tru64
              UNIX]  Displays  long  words  as  double-precision,
              floating-point.  [Tru64 UNIX]  Displays short words
              as unsigned hexadecimal values.  [Tru64 UNIX]  Displays
  long  words  as unsigned hexadecimal values.
              [Tru64  UNIX]  Displays  short  words   as   signed
              decimal  values.   [Tru64 UNIX]  Display long words
              as signed decimal values.  (The three  options  are
              identical.)   Jumps  over (reading or seeking) skip
              bytes from the beginning of the concatenated  input
              files.   If  the  input  is not at least skip bytes
              long, od writes a diagnostic  message  to  standard
              error and returns a nonzero exit value.

              The  skip argument is interpreted as a decimal number
 by default.  If you include a leading offset of
              0x or 0X, skip is interpreted as a hexadecimal number.
  A leading offset of 0 (zero) causes  skip  to
              be interpreted as an octal number.

              If you append the character b, k, or m to skip, the
              number is interpreted as a multiple of  512,  1024,
              or 1,048,576 bytes, respectively.  If b is appended
              to a skip interpreted as hexadecimal, it is  recognized
  as  the  last digit of the skip, not a block
              indicator.  Causes od to format no more than  count
              bytes of input.

              The count argument is interpreted as a decimal number
 by default.  If you include a leading offset of
              0x  or  0X,  count  is interpreted as a hexadecimal
              number.  A leading offset of 0 (zero) causes  count
              to be interpreted as an octal number.  If there are
              not count bytes of input available (after  successfully
  skipping  bytes as specified by -j), od formats
 the available input.  Displays short words  as
              octal values.  [Tru64 UNIX]  Displays long words as
              unsigned  octal  values.   [Tru64  UNIX]  Indicates
              even  parity on -a conversion.  [Tru64 UNIX]  Indicates
  odd  parity  on   -a   conversion.    [Tru64
              UNIX]  Looks  for  strings of ASCII graphic characters,
 terminated with  a  null  byte.   The  number
              argument  specifies the minimum length string to be
              recognized.  By default, the minimum  length  is  3
              characters.  Allowable characters are those between
              blank (040) and tilde (0176), as well as backspace,
              tab,  linefeed,  formfeed, and carriage-return (010
              through 015, except 013).  If the environment variable
  CMD_ENV is set to svr4, displays signed words
              (32-bit or Tru64 UNIX short words) as signed  decimal
 values.

              [Tru64  UNIX]  If  the environment variable CMD_ENV
              is set to xpg4, action is the same as using the  -i
              option.    [Tru64  UNIX]  Displays  long  words  as
              signed decimal values.  Specifies one or more  output
  types.   The  type_string argument is a string
              that specifies the types to be  used  when  writing
              the  input data.  The type_string argument consists
              of the  following  type  specification  characters:
              Named  character  Character Signed decimal Floating
              point Octal Unsigned decimal Hexadecimal

              The type specification characters d, f, o, u, and x
              can  be  followed  by  an optional unsigned decimal
              integer that specifies the number of  bytes  to  be
              transformed by each instance of the output type.

              The  type specification character f can be followed
              by one of the following optional characters,  which
              indicate  the type of the item to which the conversion
 should be applied.  float double long double

              The type specification characters d, o,  u,  and  x
              can  be  followed  by one of the following optional
              characters, which indicate the type of the item  to
              which  the  conversion  should be applied: char int
              long short

              You can concatenate multiple types within the  same
              type_string  argument  and you can specify multiple
              -t arguments.  The od  command  writes  the  output
              lines for each type specified in the order in which
              you  entered  the  type  specification  characters.
              Shows all data.  By default, display lines that are
              identical to  the  previous  line  are  not  output
              (except  for  the  byte offsets), but are indicated
              with  an  *  (asterisk)  in   column   1.    [Tru64
              UNIX]  Specifies  the  number  of input bytes to be
              interpreted and displayed on each output line.   If
              -w  is  not  specified,  16 bytes are read for each
              display line.   If  number  is  not  specified,  it
              defaults  to  32.  Displays short words as unsigned
              hexadecimal   values.   (Same   as   -h.)    [Tru64
              UNIX]  Displays  long words as unsigned hexadecimal
              values.  (Same as -H.)

       [Tru64 UNIX]  An uppercase format  character  implies  the
       long or double-precision form of the object.

OPERANDS    [Toc]    [Back]

       A  path name of a file to be written.  If no file operands
       are specified, the standard input will be  used.   If  the
       first  character  of  file is a plus sign (+) or the first
       character of the first file operand is  numeric,  no  more
       than  two  operands are given, and none of the -A, -j, -N,
       or -t options is specified, the operand is assumed  to  be
       an  offset.   Specifies the point in the file at which the
       output starts.  The  offset  argument  is  interpreted  as
       octal  bytes.   If  a  .  (dot)  is added to offset, it is
       interpreted in decimal.  If offset begins with x or 0x, it
       is  interpreted in hexadecimal.  If b (B) is appended to a
       nonhexadecimal offset, the  offset  is  interpreted  as  a
       block  count, where a block is 512 (1024) bytes.  If b (B)
       is appended to a hexadecimal offset, the b (B)  is  interpreted
  as part of the offset and the offset is not interpreted
 as a block count; a block count  can  be  specified
       only  with a decimal or an octal offset.  Interpreted as a
       pseudoaddress for the first byte displayed.  It  is  shown
       in  parentheses following the file offset.  It is intended
       to be used with core images to indicate  the  real  memory
       address.   The  syntax  for label is identical to that for
       offset.

DESCRIPTION    [Toc]    [Back]

       The output continues until the end of the file.

       When  od  reads  standard  input,  the  offset  and  label
       operands must be preceded by a + (plus sign).

       If  you  omit the file argument and do not specify -A, -j,
       -N, or -t, you must precede the offset  argument  by  a  +
       (plus sign) character.

       To  be  sure that od assumes the argument to be an offset:
       Make the first character of file a + sign,  or  the  first
       character  of  the  first  file argument numeric.  Give no
       more than two arguments.  Specify none of the -A, -j,  -N,
       or -t options.

RESTRICTIONS    [Toc]    [Back]

       The  od command has the following restrictions: You cannot
       use the command with disks that have a  capacity  of  more
       than  4  GB.   You  cannot  specify an offset of more than
       (2**32)-1 as a starting point.

NOTES    [Toc]    [Back]

       [Tru64 UNIX]  The -i option displays short words as signed
       decimal  values.  The -i option used to be -s in System V.

EXIT STATUS    [Toc]    [Back]

       The following exit values are returned:  All  input  files
       were processed successfully.  An error occurred.

EXAMPLES    [Toc]    [Back]

       To  display a file in octal word format, a page at a time,
       enter: od  a.out | more To translate a file  into  several
       formats at once, enter: od  -cx  a.out  >a.xcd

              This  writes  a.out  in  hexadecimal format (the -x
              option) into the file a.xcd, giving also the  ASCII
              character  equivalent, if any, of each byte (the -c
              option).  To start in the middle of a file,  enter:
              od  -bcx  a.out  +100.

              This  displays  a.out in octal-byte, character, and
              hexadecimal formats, starting from the 100th  byte.
              The  .  (dot)  after  the offset makes it a decimal
              number. Without the (dot), the dump starts from the
              64th (100 octal) byte.

ENVIRONMENT VARIABLES    [Toc]    [Back]

       The  following  environment variables affect the execution
       of od: Provides a default value for the  internationalization
  variables  that are unset or null.  If LANG is unset
       or null, the corresponding value from the  default  locale
       is  used.   If  any  of the internationalization variables
       contain an invalid setting, the utility behaves as if none
       of  the variables had been defined.  If set to a non-empty
       string value, overrides the values of all the other internationalization
  variables.  Determines the locale for the
       interpretation of sequences of bytes of text data as characters
  (for  example, single-byte as opposed to multibyte
       characters in arguments).  Determines the locale  for  the
       format  and  contents  of  diagnostic  messages written to
       standard error.  Determines the location of message  catalogues
 for the processing of LC_MESSAGES.

SEE ALSO    [Toc]    [Back]

      
      
       Commands:  sed(1)

       Files:  locale(4)

       Standards:  standards(5)



                                                            od(1)
[ Back ]
 Similar pages
Name OS Title
pr Tru64 Writes a file to standard output
tail Tru64 Writes a file to standard output, beginning at a specified point
echo Tru64 Writes its arguments to standard output
calendar Tru64 Writes reminder messages to standard output
news Tru64 Writes system news items to standard output
strace Tru64 Writes STREAMS event trace messages to standard output
UilDumpSymbolTable IRIX Dumps the contents of a named UIL symbol table to standard output
UilDumpSymbolTable Tru64 Dumps the contents of a named UIL symbol table to standard output
UilDumpSymbolTable HP-UX Dumps the contents of a named UIL symbol table to standard output
printf Tru64 Writes formatted output
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service