unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OpenBSD-3.6)
Page:
Section:
Apropos / Subsearch:
optional field

GETEXTATTR(8)           OpenBSD System Manager's Manual          GETEXTATTR(8)

NAME
     getextattr - retrieve a named extended attribute

SYNOPSIS
     getextattr [-ls] attrnamespace attrname filename ...

DESCRIPTION
     getextattr is a user tool to retrieve a named extended attribute on a
     file or directory.  The attrnamespace argument should be the namespace of
     the attribute to retrieve: legal values are "user" and "system".  The
     attrname argument should be the name of the attribute, and filename a
     list of files and directories from which to retrieve attribute data.

     The following options are available:

     -l      Print attributes in the first column and file names in the sec-
             ond.  Can be used only in conjunction with the -s option.

     -s      Attempt to display the attribute data as a string, although the
             results may not look pretty if the data is binary data.  The
             strvisx(3) function is used to generate the string, so control
             sequences should be safely escaped.  Otherwise, the attribute da-
             ta will be represented as a series of two-digit hex numbers.

IMPLEMENTATION NOTES
     In order for getextattr to succeed, the attribute service must be avail-
     able on the file system, and the attribute must be defined for the file
     queried.

EXAMPLES
           # getextattr system md5 /bsd
           /bsd:
             61 61 33 62 39 39 66 65    31 35 35 32 31 62 65 32
             62 36 38 36 62 31 66 39    63 64 33 39 35 36 36 31
           # getextattr -s system md5 /bsd
           /bsd: "aa3b99fe15521be2b686b1f9cd395661"

     Retrieve the ``md5'' extended attribute for the file /bsd.

SEE ALSO
     extattr(2), extattr(3), extattrctl(8), setextattr(8), extattr(9)

HISTORY
     Extended attribute support was developed as part of the TrustedBSD Pro-
     ject.  It was developed to support security extensions requiring addi-
     tional labels to be associated with each file or directory.

AUTHORS
     Robert N M Watson

BUGS
     The output format for this utility is ugly, and worse yet, not very use-
     ful.

OpenBSD 3.6                     March 30, 2000                               1