xref: /freebsd/bin/uuidgen/uuidgen.1 (revision 7ef62cebc2f965b0f640263e179276928885e33d)
1.\" Copyright (c) 2002 Marcel Moolenaar
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\"
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\"
25.\" $FreeBSD$
26.\"
27.Dd March 1, 2023
28.Dt UUIDGEN 1
29.Os
30.Sh NAME
31.Nm uuidgen
32.Nd generate universally unique identifiers
33.Sh SYNOPSIS
34.Nm
35.Op Fl 1
36.Op Fl r
37.Op Fl c
38.Op Fl n Ar count
39.Op Fl o Ar filename
40.Sh DESCRIPTION
41The
42.Nm
43utility by default generates a single DCE version 1
44universally unique identifier (UUID),
45also known as a globally unique identifier (GUID).
46The UUID is written to stdout by default.
47The following options can be used to change the behaviour of
48.Nm :
49.Bl -tag -width indent
50.It Fl 1
51This option only has effect if multiple identifiers are to be generated and
52instructs
53.Nm
54to not generate them in batch, but one at a time.
55.It Fl r
56This option controls creation of random UUID (version 4).
57.It Fl c
58This option controls creation of compact UUID (without hyphen).
59.It Fl n
60This option controls the number of identifiers generated.
61By default, multiple identifiers are generated in batch.
62The upper hard limit is 2048
63.Po see
64.Xr uuidgen 2
65.Pc .
66.It Fl o
67Redirect output to
68.Ar filename
69instead of stdout.
70.El
71.Pp
72Batched generation yields a dense set of identifiers in such a way that there
73is no identifier that is larger than the smallest identifier in the set and
74smaller than the largest identifier in the set and that is not already in the
75set.
76.Pp
77When generating the identifiers one at a time, the identifiers will be close
78to each other, but operating system latency and processing time will be
79reflected in the distance between two successive identifiers.
80.Sh EXIT STATUS
81.Ex -std
82.Sh SEE ALSO
83.Xr uuidgen 2 ,
84.Xr uuid 3
85.Sh HISTORY
86The
87.Nm
88command first appeared in
89.Fx 5.0 .
90