Skip to content

Commit

Permalink
Added example usage
Browse files Browse the repository at this point in the history
  • Loading branch information
davecheney committed Jul 31, 2011
1 parent 222d6ae commit d9cf639
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,35 @@ A example program is provided with the source. The simplest way to compile and i

This will install it to your $GOBIN directory. If you have trouble running this example, make sure there isn't another xattr somewhere higher in your $PATH.

Before you start
----------------

All extended attributes need a file to be associated with. In this example I'm going to create an empty file in my home directory (see notes in the installation section)

touch ~/testfile

Setting an attribute
--------------------

% $GOBIN/xattr -w username dave ~/testfile

Listing known attributes
--------------------

% $GOBIN/xattr ~/testfile
username

Printing attribute values
-------------------------

% $GOBIN/xattr -p username ~/testfile
dave

Listing names and values
------------------------

% $GOBIN/xattr -l ~/testfile
username: dave



0 comments on commit d9cf639

Please sign in to comment.