od
od [OPTION]... [--] [NOMFICHIER]...
od [-abcdDefFhHiIlLoOsxX] [NOMFICHIER] [[+][0x]DÉCALAGE[.][b]]
od --traditional [OPTION]... [NOMFICHIER] [[+][0x]DÉCALAGE[.][b] [[+][0x]ÉTIQUETTE[.][b]]]
Afficher les fichiers en format octal et autres formats
Options
--help-
Print help information.
--address-radix=<RADIX>,-A <RADIX>-
Select the base in which file offsets are printed.
--skip-bytes=<BYTES>,-j <BYTES>-
Skip BYTES input bytes before formatting and writing.
--read-bytes=<BYTES>,-N <BYTES>-
limit dump to BYTES input bytes
--endian=<big|little>-
byte order to use for multi-byte formats
--strings=<BYTES>,-S <BYTES>-
output strings of at least BYTES graphic chars. 3 is assumed when BYTES is not specified.
-a-
named characters, ignoring high-order bit
-b-
octal bytes
-c-
ASCII characters or backslash escapes
-d-
unsigned decimal 2-byte units
-D-
unsigned decimal 4-byte units
-o-
octal 2-byte units
-I-
decimal 8-byte units
-L-
decimal 8-byte units
-i-
decimal 4-byte units
-l-
decimal 8-byte units
-x-
hexadecimal 2-byte units
-h-
hexadecimal 2-byte units
-O-
octal 4-byte units
-s-
decimal 2-byte units
-X-
hexadecimal 4-byte units
-H-
hexadecimal 4-byte units
-e-
floating point double precision (64-bit) units
-f-
floating point single precision (32-bit) units
-F-
floating point double precision (64-bit) units
--format=<TYPE>,-t <TYPE>-
select output format or formats
--output-duplicates,-v-
do not use * to mark line suppression
--width=<BYTES>,-w <BYTES>-
output BYTES bytes per output line. 32 is implied when BYTES is not
specified. --traditional-
compatibility mode with one input, offset and label.
Affiche les données dans divers formats lisibles par l’homme. Si plusieurs formats sont spécifiés, la sortie contiendra tous les formats dans l’ordre où ils apparaissent sur la ligne de commande. Chaque format sera imprimé sur une nouvelle ligne. Seule la ligne contenant le premier format sera préfixée avec le décalage.
Si aucun nom de fichier n’est spécifié, ou si c’est “-”, stdin sera utilisé. Après un “–”, aucune autre option ne sera reconnue. Cela permet d’avoir des noms de fichiers commençant par “-”.
Si un nom de fichier est un nombre valide qui peut être utilisé comme décalage dans la deuxième forme, vous pouvez le forcer à être reconnu comme un nom de fichier si vous incluez une option comme “-j0”, qui n’est valide que dans la première forme.
RADIX est l’un de o,d,x,n pour octal, décimal, hexadécimal ou aucun.
OCTETS est décimal par défaut, octal si préfixé par “0”, ou hexadécimal si préfixé par “0x”. Les suffixes b, KB, K, MB, M, GB, G multiplieront le nombre par 512, 1000, 1024, 1000^2, 1024^2, 1000^3, 1024^3, 1000^2, 1024^2.
DÉCALAGE et ÉTIQUETTE sont octaux par défaut, hexadécimaux si préfixés par “0x” ou décimaux si un suffixe “.” est ajouté. Le suffixe “b” multipliera par 512.
TYPE contient une ou plusieurs spécifications de format constituées de : a pour ASCII imprimable 7-bits c pour caractères utf-8 ou octal pour caractères non définis d[TAILLE] pour décimal signé f[TAILLE] pour virgule flottante o[TAILLE] pour octal u[TAILLE] pour décimal non signé x[TAILLE] pour hexadécimal TAILLE est le nombre d’octets qui peut être le nombre 1, 2, 4, 8 ou 16, ou C, S, I, L pour 1, 2, 4, 8 octets pour les types entiers, ou F, D, L pour 4, 8, 16 octets pour les virgules flottantes. Toute spécification de type peut avoir un suffixe “z”, qui ajoutera un dump ASCII à la fin de la ligne.
Si une erreur s’est produite, un message de diagnostic sera imprimé sur stderr, et le code de sortie sera non-zéro.
Examples
Display file using default settings: octal format, 8 bytes per line, byte offsets in octal, and duplicate lines replaced with *:
od {{path/to/file}}
Display file in verbose mode, i.e. without replacing duplicate lines with *:
od {{[-v|--output-duplicates]}} {{path/to/file}}
Display file in hexadecimal format (2-byte units), with byte offsets in decimal format:
od {{[-t|--format]}} {{x}} {{[-A|--address-radix]}} {{d}} {{[-v|--output-duplicates]}} {{path/to/file}}
Display file in hexadecimal format (1-byte units), and 4 bytes per line:
od {{[-t|--format]}} {{x1}} {{[-w|--width=]}}4 {{[-v|--output-duplicates]}} {{path/to/file}}
Display file in hexadecimal format along with its character representation, and do not print byte offsets:
od {{[-t|--format]}} {{xz}} {{[-A|--address-radix]}} {{n}} {{[-v|--output-duplicates]}} {{path/to/file}}
Read only 100 bytes of a file starting from the 500th byte:
od {{[-N|--read-bytes]}} 100 {{[-j|--skip-bytes]}} 500 {{[-v|--output-duplicates]}} {{path/to/file}}
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.