varsym: Update man page & sync usage()
[dragonfly.git] / bin / varsym / varsym.1
... / ...
CommitLineData
1.\" Copyright (c) 2003 Matthew Dillon <dillon@backplane.com>
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.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\" notice, this list of conditions and the following disclaimer in the
11.\" documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $DragonFly: src/bin/varsym/varsym.1,v 1.10 2008/02/22 05:19:25 swildner Exp $
26.\"
27.Dd September 27, 2009
28.Dt VARSYM 1
29.Os
30.Sh NAME
31.Nm varsym
32.Nd get and set user and system-wide variables for variant symlinks
33.Sh SYNOPSIS
34.Nm
35.Op Fl adpqsu
36.Oo
37.Ar var Ns Op Ns Cm = Ns Ar data
38.Ar ...
39.Oc
40.Sh DESCRIPTION
41The
42.Nm
43program manages user and system-wide variables.
44These variables are typically
45used by the system to resolve variant symlinks but may also be used generally.
46.Pp
47For each operand set, modify, retrieve, or delete the specified variable.
48By default variables specified without data are retrieved and variables
49specified with data are set.
50Variables may be set to empty.
51.Bl -tag -width Ar
52.It Fl a
53List all variables at the specified level.
54Note that per-process variables
55override per-user variables and per-user variables override system-wide
56variables.
57By default, per-user variables are listed.
58.It Fl d
59Delete mode.
60The specified variables are deleted.
61Any specified data is ignored.
62.It Fl p
63This option causes variables to be set on a per-process basis and restricts
64retrievals to process-specific variables.
65Note that since
66.Nm
67is run as its own process, using this option to set a variable will not
68affect your shell's namespace.
69.It Fl q
70Quiet mode.
71When retrieving a variable only its data is printed.
72.It Fl s
73This option causes variables to be set system-wide and restricts retrievals
74to system-specific variables.
75.It Fl u
76This option causes variables to be set on a per-user-id basis and restricts
77retrievals to user-specific variables.
78This is the default.
79.El
80.Sh DIAGNOSTICS
81The
82.Nm
83utility exits with one of the following values:
84.Bl -tag -width Ds
85.It 0
86No errors occurred.
87.It 1
88A requested variable could not be found
89.It 2
90A requested variable could not be set
91.El
92.Sh SEE ALSO
93.Xr ln 1 ,
94.Xr varsym 2 ,
95.Xr varsym.conf 5