diff options
author | Nathan Scott <nathans@sgi.com> | 2001-01-15 03:18:30 +0000 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2001-01-15 03:18:30 +0000 |
commit | 02f43564629f54847c04cc32f77cb1b6ba3b89c2 (patch) | |
tree | ae1217c94a5d2659dcf985e1385941e20ef2f60f /man/man1 | |
parent | 82129da6af3a2cddad3334623cfe415058036e4c (diff) | |
download | attr-02f43564629f54847c04cc32f77cb1b6ba3b89c2.tar.gz |
initial version for reworked extended attributes build environment.
Diffstat (limited to 'man/man1')
-rw-r--r-- | man/man1/Makefile | 49 | ||||
-rw-r--r-- | man/man1/attr.1 | 165 |
2 files changed, 214 insertions, 0 deletions
diff --git a/man/man1/Makefile b/man/man1/Makefile new file mode 100644 index 0000000..83c09c9 --- /dev/null +++ b/man/man1/Makefile @@ -0,0 +1,49 @@ +# +# Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. +# +# This program is free software; you can redistribute it and/or modify it +# under the terms of version 2 of the GNU General Public License as +# published by the Free Software Foundation. +# +# This program is distributed in the hope that it would be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# Further, this software is distributed without any warranty that it is +# free of the rightful claim of any third person regarding infringement +# or the like. Any license provided herein, whether implied or +# otherwise, applies only to this software file. Patent licenses, if +# any, provided herein do not apply to combinations of this program with +# other software, or any other product whatsoever. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write the Free Software Foundation, Inc., 59 +# Temple Place - Suite 330, Boston MA 02111-1307, USA. +# +# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, +# Mountain View, CA 94043, or: +# +# http://www.sgi.com +# +# For further information regarding this notice, see: +# +# http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/ +# + +TOPDIR = ../.. +include $(TOPDIR)/include/builddefs + +MAN_SECTION = 1 + +MAN_PAGES = $(shell echo *.$(MAN_SECTION)) +MAN_DEST = $(PKG_MAN_DIR)/man$(MAN_SECTION) +LSRCFILES = $(MAN_PAGES) + +default : $(MAN_PAGES) + +include $(BUILDRULES) + +install : default + $(INSTALL) -m 755 -d $(MAN_DEST) + $(INSTALL_MAN) +install-dev: diff --git a/man/man1/attr.1 b/man/man1/attr.1 new file mode 100644 index 0000000..7d0302e --- /dev/null +++ b/man/man1/attr.1 @@ -0,0 +1,165 @@ +.TH attr 1 +.SH NAME +attr \- manipulate Extended Attributes on filesystem objects +.SH SYNOPSIS +.nf +\f3attr\f1 [ \f3\-LRq\f1 ] \f3\-s attrname\f1 [ \f3\-V attrvalue\f1 ] \c +\f3pathname\f1 +.sp .8v +\f3attr\f1 [ \f3\-LRq\f1 ] \f3\-g attrname pathname\f1 +.sp .8v +\f3attr\f1 [ \f3\-LRq\f1 ] \f3\-r attrname pathname\f1 +.sp .8v +\f3attr\f1 [ \f3\-LRq\f1 ] \f3\-l pathname\f1 +.sp .8v +.fi +.SH OVERVIEW +Extended Attributes implement the ability for a user to attach +name/value pairs to objects within the filesystem. +They are currently only supported in XFS filesystems. +.P +They could be used to store meta-information about the file. +For example "character-set=kanji" could tell a document browser to +use the Kanji character set when displaying that document +and "thumbnail=..." could provide a reduced resolution overview of a +high resolution graphic image. +.P +The +.I names +can be up to 256 bytes in length, terminated by the first 0 byte. +The intent is that they be printable ASCII (or other character set) +names for the attribute. +.P +The +.I values +can be up to 256KB of arbitrary binary data. +.P +Attributes can be attached to all types of inodes: +regular files, directories, symbolic links, device nodes, etc. +.P +There are 2 disjoint attribute name spaces associated with every +filesystem object. +They are the +.B root +and +.B user +address spaces. +The +.B root +address space is accessable only to the superuser, +and then only by specifying a flag argument to the function call. +Other users will not see or be able to modify attributes in the +.B root +address space. +The +.B user +address space is protected by the normal file permissions mechanism, +so the owner of the file can decide who is able to see and/or modify +the value of attributes on any particular file. +.P +Attributes are currently supported only in the XFS filesystem type. +.SH DESCRIPTION +The +.I attr +utility allows the manipulation of Extended Attributes associated with +filesystem objects from within shell scripts. +.PP +There are four main operations that +.I attr +can perform: +.TP +.B GET +The +.B \-g attrname +option tells +.I attr +to search the named object and print (to \f4stdout\fP) the value +associated with that attribute name. +With the +.B \-q +flag, \f4stdout\fP will be exactly and only the value of the attribute, +suitable for storage directly into a file or processing via a piped command. +.TP +.B LIST +The +.B \-l +option tells +.I attr +to list the names of all the attributes that are associated with the object, +and the number of bytes in the value of each of those attributes. +With the +.B \-q +flag, \f4stdout\fP will be a simple list of only the attribute names, +one per line, suitable for input into a script. +.TP +.B REMOVE +The +.B \-r attrname +option tells +.I attr +to remove an attribute with the given name from the object if the +attribute exists. +There is no output on sucessful completion. +.TP +.B SET/CREATE +The +.B \-s attrname +option tells +.I attr +to set the named attribute of the object to the value read from \f4stdin\fP. +If an attribute with that name already exists, +its value will be replaced with this one. +If an attribute with that name does not already exist, +one will be created with this value. +With the +.B \-V attrvalue +flag, the attribute will be set to have a value of +.B attrvalue +and \f4stdin\fP will not be read. +With the +.B \-q +flag, \f4stdout\fP will not be used. +Without the +.B \-q +flag, a message showing the attribute name and the entire value +will be printed. +.PP +When the +.B \-L +option is given and the named object is a symbolic link, +operate on the attributes of the object referenced by the symbolic link. +Without this option, operate on the attributes of the symbolic link itself. +.PP +When the +.B \-R +option is given and the process has appropriate privileges, +operate in the +.I root +attribute namespace rather that the +.I USER +attribute namespace. +.PP +When the +.B \-q +option is given +.I attr +will try to keep quiet. +It will output error messages (to \f4stderr\fP) +but will not print status messages (to \f4stdout\fP). +.SH "NOTES" +The standard file interchange/archive programs +.IR tar (1), +.IR cpio (1), +and +.IR bru (1) +will not archive or restore Extended Attributes, +while the +.IR xfsdump (8) +program will. +.SH "SEE ALSO" +attr_get(2), attr_getf(2), +attr_list(2), attr_listf(2), +attr_multi(2), attr_multif(2), +attr_remove(2), attr_removef(2), +attr_set(2), attr_setf(2), +xfsdump(8). |