man uuid (Commandes) - Universally Unique Identifier Command-Line Tool

NAME

OSSP uuid - Universally Unique Identifier Command-Line Tool

VERSION

OSSP uuid 1.3.2 (06-Dec-2005)

SYNOPSIS

uuid [-v version] [-m] [-n count] [-1] [-r] [-o filename] [namespace name]

uuid -d [-r] [-o filename] uuid

DESCRIPTION

OSSP uuid is a ISO-C:1999 application programming interface (API) and corresponding command line interface (CLI) for the generation of DCE 1.1, ISO/IEC 11578:1996 and RFC 4122 compliant Universally Unique Identifier (UUID). It supports DCE 1.1 variant UUIDs of version 1 (time and node based), version 3 (name based, MD5), version 4 (random number based) and version 5 (name based, SHA-1). Additional API bindings are provided for the languages ISO-:1998, Perl:5 and PHP:4/5. Optional backward compatibility exists for the ISO-C DCE-1.1 and Perl Data::UUID APIs.

UUIDs are 128 bit numbers which are intended to have a high likelihood of uniqueness over space and time and are computationally difficult to guess. They are globally unique identifiers which can be locally generated without contacting a global registration authority. UUIDs are intended as unique identifiers for both mass tagging objects with an extremely short lifetime and to reliably identifying very persistent objects across a network.

This is the command line interface (CLI) of OSSP uuid. For a detailed description of UUIDs see the documentation of the application programming interface (API) in uuid(3).

OPTIONS

-v version
Sets the version of the generated DCE 1.1 variant UUID. Supported are version "CW1, CW3, CW4 and CW5. The default is CW1". For version 3 and version 5 UUIDs the additional command line arguments namespace and name have to be given. The namespace is either a UUID in string representation or an identifier for internally pre-defined namespace UUIDs (currently known are "CWns:DNS, CWns:URL, CWns:OID, and CWns:X500"). The name is a string of arbitrary length.
-m
Forces the use of a random multi-cast MAC address when generating version 1 UUIDs. By default the real physical MAC address of the system is used.
-n count
Generate count UUIDs instead of just a single one (the default).
-1
If option -n is used with a count greater than CW1, then this option can enforce the reset the UUID context for each generated UUID. This makes no difference for version CW3, CW4 and CW5 UUIDs. But version CW1 UUIDs are based on the previously generated UUID which is remembered in the UUID context of the API. Option -1 deletes the remembered UUID on each iteration.
-r
Output the generated UUID in 128 bit (network byte order) raw binary representation format. The default is to output the generated UUID in the standardized ASCII string representation.
-o filename
Write output to filename instead of to stdout.
-d
Decode a given UUID (given as a command line argument or if the command line argument is "CW-" the UUID is read from stdin) and dump textual information about the UUID.

EXAMPLES

 # generate DCE 1.1 v1 UUID (time and node based)
 $ uuid -v1
 01c47915-4777-11d8-bc70-0090272ff725

 # decode and dump DCE 1.1 v1 UUID (time and node based)
 $ uuid -d 01c47915-4777-11d8-bc70-0090272ff725
 UUID:    01c47915-4777-11d8-bc70-0090272ff725
 variant: DCE 1.1, ISO/IEC 11578:1996
 version: 1 (time and node based)
 content: time:  2004-01-15 16:22:26.376322.1 UTC
          clock: 15472 (usually random)
          node:  00:90:27:2f:f7:25 (global unicast)

 # generate DCE 1.1 v3 UUID (name based)
 $ uuid -v3 ns:URL http://www.ossp.org/
 02d9e6d5-9467-382e-8f9b-9300a64ac3cd

 # decode and dump DCE 1.1 v3 UUID (name based)
 $ uuid -d 02d9e6d5-9467-382e-8f9b-9300a64ac3cd
 UUID:    02d9e6d5-9467-382e-8f9b-9300a64ac3cd
 variant: DCE 1.1, ISO/IEC 11578:1996
 version: 3 (name based)
 content: 02:D9:E6:D5:94:67:08:2E:0F:9B:93:00:A6:4A:C3:CD
          (not decipherable, because message digest only)

 # generate DCE 1.1 v4 UUID 4 (random data based)
 $ uuid -v4
 eb424026-6f54-4ef8-a4d0-bb658a1fc6cf

 # decode and dump DCE 1.1 v4 UUID 4 (random data based)
 $ uuid -d eb424026-6f54-4ef8-a4d0-bb658a1fc6cf
 UUID:    eb424026-6f54-4ef8-a4d0-bb658a1fc6cf
 variant: DCE 1.1, ISO/IEC 11578:1996
 version: 4 (random data based)
 content: EB:42:40:26:6F:54:0E:F8:24:D0:BB:65:8A:1F:C6:CF
          (no semantics, because random data only)

SEE ALSO