xref: /freebsd/usr.sbin/extattr/rmextattr.8 (revision a068c194dfaae469a5101a826d24bbd7ad137d07)
1a068c194SPoul-Henning Kamp.\"-
2a068c194SPoul-Henning Kamp.\" Copyright (c) 2000, 2001 Robert N. M. Watson
3a068c194SPoul-Henning Kamp.\" Copyright (c) 2002 Networks Associates Technology, Inc.
4a068c194SPoul-Henning Kamp.\" All rights reserved.
5a068c194SPoul-Henning Kamp.\"
6a068c194SPoul-Henning Kamp.\" This software was developed for the FreeBSD Project by Poul-Henning
7a068c194SPoul-Henning Kamp.\" Kamp and Network Associates Laboratories, the Security Research Division
8a068c194SPoul-Henning Kamp.\" of Network Associates, Inc. under DARPA/SPAWAR contract N66001-01-C-8035
9a068c194SPoul-Henning Kamp.\" ("CBOSS"), as part of the DARPA CHATS research program
10a068c194SPoul-Henning Kamp.\"
11a068c194SPoul-Henning Kamp.\" Redistribution and use in source and binary forms, with or without
12a068c194SPoul-Henning Kamp.\" modification, are permitted provided that the following conditions
13a068c194SPoul-Henning Kamp.\" are met:
14a068c194SPoul-Henning Kamp.\" 1. Redistributions of source code must retain the above copyright
15a068c194SPoul-Henning Kamp.\"    notice, this list of conditions and the following disclaimer.
16a068c194SPoul-Henning Kamp.\" 2. Redistributions in binary form must reproduce the above copyright
17a068c194SPoul-Henning Kamp.\"    notice, this list of conditions and the following disclaimer in the
18a068c194SPoul-Henning Kamp.\"    documentation and/or other materials provided with the distribution.
19a068c194SPoul-Henning Kamp.\"
20a068c194SPoul-Henning Kamp.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
21a068c194SPoul-Henning Kamp.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22a068c194SPoul-Henning Kamp.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23a068c194SPoul-Henning Kamp.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
24a068c194SPoul-Henning Kamp.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25a068c194SPoul-Henning Kamp.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26a068c194SPoul-Henning Kamp.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27a068c194SPoul-Henning Kamp.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28a068c194SPoul-Henning Kamp.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29a068c194SPoul-Henning Kamp.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
30a068c194SPoul-Henning Kamp.\" SUCH DAMAGE.
31a068c194SPoul-Henning Kamp.\"
32a068c194SPoul-Henning Kamp.\" $FreeBSD$
33a068c194SPoul-Henning Kamp.\"
34a068c194SPoul-Henning Kamp.Dd August 30, 2000
35a068c194SPoul-Henning Kamp.Dt RMEXTATTR 8
36a068c194SPoul-Henning Kamp.Os
37a068c194SPoul-Henning Kamp.Sh NAME
38a068c194SPoul-Henning Kamp.Nm getextattr ,
39a068c194SPoul-Henning Kamp.Nm lsextattr ,
40a068c194SPoul-Henning Kamp.Nm rmextattr ,
41a068c194SPoul-Henning Kamp.Nm setextattr
42a068c194SPoul-Henning Kamp.Nd manipulated extended attributes
43a068c194SPoul-Henning Kamp.Sh SYNOPSIS
44a068c194SPoul-Henning Kamp.Nm getextattr
45a068c194SPoul-Henning Kamp.Op Fl fqsx
46a068c194SPoul-Henning Kamp.Ar attrnamespace
47a068c194SPoul-Henning Kamp.Ar attrname
48a068c194SPoul-Henning Kamp.Ar filename ...
49a068c194SPoul-Henning Kamp.Nm lsextattr
50a068c194SPoul-Henning Kamp.Op Fl fq
51a068c194SPoul-Henning Kamp.Ar attrnamespace
52a068c194SPoul-Henning Kamp.Ar filename ...
53a068c194SPoul-Henning Kamp.Nm rmextattr
54a068c194SPoul-Henning Kamp.Op Fl fq
55a068c194SPoul-Henning Kamp.Ar attrnamespace
56a068c194SPoul-Henning Kamp.Ar attrname
57a068c194SPoul-Henning Kamp.Ar filename ...
58a068c194SPoul-Henning Kamp.Nm setextattr
59a068c194SPoul-Henning Kamp.Op Fl fq
60a068c194SPoul-Henning Kamp.Ar attrnamespace
61a068c194SPoul-Henning Kamp.Ar attrname
62a068c194SPoul-Henning Kamp.Ar attrvalue
63a068c194SPoul-Henning Kamp.Ar filename ...
64a068c194SPoul-Henning Kamp.Sh DESCRIPTION
65a068c194SPoul-Henning KampThese
66a068c194SPoul-Henning Kamputilities
67a068c194SPoul-Henning Kampare user tools to manipulated a named extended attributes on files and
68a068c194SPoul-Henning Kampdirectories.
69a068c194SPoul-Henning KampThe
70a068c194SPoul-Henning Kamp.Ar attrnamespace
71a068c194SPoul-Henning Kampargument should be the namespace of the attribute to retrieve: legal
72a068c194SPoul-Henning Kampvalues are "user" and "system".
73a068c194SPoul-Henning KampThe
74a068c194SPoul-Henning Kamp.Ar attrname
75a068c194SPoul-Henning Kampargument should be the name of the attribute,
76a068c194SPoul-Henning Kamp.Ar filename
77a068c194SPoul-Henning Kampthe name of the target file or directory,
78a068c194SPoul-Henning Kamp.Ar attrvalue
79a068c194SPoul-Henning Kampa string to store in the attribute.
80a068c194SPoul-Henning Kamp.Pp
81a068c194SPoul-Henning KampThe following options are available:
82a068c194SPoul-Henning Kamp.Bl -tag -width flag
83a068c194SPoul-Henning Kamp.It Fl -f
84a068c194SPoul-Henning Kamp(Force) Ignore errors on individual filenames and continue with
85a068c194SPoul-Henning Kampthe remaining arguments.
86a068c194SPoul-Henning Kamp.It Fl -q
87a068c194SPoul-Henning Kamp(Quiet) Do not print out the pathname and suppress error messages.
88a068c194SPoul-Henning Kamp.It Fl -s
89a068c194SPoul-Henning Kamp(Stringify) Escape nonprinting characters and put quotes around the output.
90a068c194SPoul-Henning Kamp.It Fl -x
91a068c194SPoul-Henning Kamp(Hex) Print the output in hexadecimal.
92a068c194SPoul-Henning Kamp.El
93a068c194SPoul-Henning Kamp.Sh EXAMPLES
94a068c194SPoul-Henning Kamp.Dl # setextattr system md5 `md5 -q /boot/kernel/kernel` /boot/kernel/kernel
95a068c194SPoul-Henning Kamp.Dl # getextattr system md5 /boot/kernel/kernel
96a068c194SPoul-Henning Kamp.Dl # lsextattr system /boot/kernel/kernel
97a068c194SPoul-Henning Kamp.Dl # rmextattr system md5 /boot/kernel/kernel
98a068c194SPoul-Henning Kamp.Sh SEE ALSO
99a068c194SPoul-Henning Kamp.Xr extattr 2 ,
100a068c194SPoul-Henning Kamp.Xr extattr 3 ,
101a068c194SPoul-Henning Kamp.Xr extattrctl 8 ,
102a068c194SPoul-Henning Kamp.Xr extattr 9
103a068c194SPoul-Henning Kamp.Sh HISTORY
104a068c194SPoul-Henning KampExtended attribute support was developed as part of the TrustedBSD Project,
105a068c194SPoul-Henning Kampand introduced in
106a068c194SPoul-Henning Kamp.Fx 5.0 .
107a068c194SPoul-Henning KampIt was developed to support security extensions requiring additional labels
108a068c194SPoul-Henning Kampto be associated with each file or directory.
109a068c194SPoul-Henning Kamp.Sh AUTHORS
110a068c194SPoul-Henning KampRobert N M Watson and
111a068c194SPoul-Henning KampPoul-Henning Kamp
112a068c194SPoul-Henning Kamp.Sh BUGS
113a068c194SPoul-Henning KampThe
114a068c194SPoul-Henning Kamp.Nm setextattr
115a068c194SPoul-Henning Kamputility can only be used to set attributes to strings.
116