aboutsummaryrefslogtreecommitdiff
path: root/bin/uuidgen/uuidgen.1
diff options
context:
space:
mode:
Diffstat (limited to 'bin/uuidgen/uuidgen.1')
-rw-r--r--bin/uuidgen/uuidgen.137
1 files changed, 33 insertions, 4 deletions
diff --git a/bin/uuidgen/uuidgen.1 b/bin/uuidgen/uuidgen.1
index f793fb248cdf..f7911b408f36 100644
--- a/bin/uuidgen/uuidgen.1
+++ b/bin/uuidgen/uuidgen.1
@@ -1,3 +1,6 @@
+.\"
+.\" SPDX-License-Identifier: BSD-2-Clause
+.\"
.\" Copyright (c) 2002 Marcel Moolenaar
.\" All rights reserved.
.\"
@@ -22,9 +25,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.\" $FreeBSD$
-.\"
-.Dd May 23, 2012
+.Dd August 27, 2025
.Dt UUIDGEN 1
.Os
.Sh NAME
@@ -32,7 +33,7 @@
.Nd generate universally unique identifiers
.Sh SYNOPSIS
.Nm
-.Op Fl 1
+.Op Fl 1cr
.Op Fl n Ar count
.Op Fl o Ar filename
.Sh DESCRIPTION
@@ -50,6 +51,8 @@ This option only has effect if multiple identifiers are to be generated and
instructs
.Nm
to not generate them in batch, but one at a time.
+.It Fl c
+This option controls creation of compact UUID (without hyphen).
.It Fl n
This option controls the number of identifiers generated.
By default, multiple identifiers are generated in batch.
@@ -61,6 +64,8 @@ The upper hard limit is 2048
Redirect output to
.Ar filename
instead of stdout.
+.It Fl r
+This option controls creation of random UUID (version 4).
.El
.Pp
Batched generation yields a dense set of identifiers in such a way that there
@@ -73,6 +78,30 @@ to each other, but operating system latency and processing time will be
reflected in the distance between two successive identifiers.
.Sh EXIT STATUS
.Ex -std
+.Sh EXAMPLES
+Generate a batch of three UUIDs.
+Notice the similarity of the string before the first hyphen of the UUID
+.Po known as
+.Em time_low
+in
+.Em rfc4122
+.Pc :
+.Bd -literal -offset indent
+$ uuidgen -n3
+8bc44345-4d90-11ee-88c7-b42e991fc52e
+8bc44346-4d90-11ee-88c7-b42e991fc52e
+8bc44347-4d90-11ee-88c7-b42e991fc52e
+.Ed
+.Pp
+Generate a batch of random UUIDs without hyphens:
+.Bd -literal -offset indent
+$ uuidgen -r -c -n3
+5ad8b60a0f4e41f59c82d273202275f9
+6c41925486cd4bf59720a5bad85de2e4
+8144fdab63f648a1812d12453f975313
+.Ed
+.Pp
+Notice that the UUIDs are not similar to each other.
.Sh SEE ALSO
.Xr uuidgen 2 ,
.Xr uuid 3