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