summaryrefslogtreecommitdiff
path: root/man/man1/setfattr.1
diff options
context:
space:
mode:
authorAchilles Gaikwad <agaikwad@redhat.com>2020-02-06 10:09:38 +0530
committerAndreas Gruenbacher <agruenba@redhat.com>2020-02-06 16:56:44 +0100
commit1c14b97fba52560ee4812b73288b3d6ca672f9a5 (patch)
treee53d6baab638f9530dfcef9370836538bdcda034 /man/man1/setfattr.1
parentff1b6ff8e823a7c086209b2409082d55b018b34d (diff)
downloadattr-1c14b97fba52560ee4812b73288b3d6ca672f9a5.tar.gz
man: add examples to setfattr.1
The current man page for setfattr does not state that the user needs to add the prefix "user." With the help of examples we demonstrate that the user needs to add a namespace as prefix. Signed-off-by: Achilles Gaikwad <agaikwad@redhat.com>
Diffstat (limited to 'man/man1/setfattr.1')
-rw-r--r--man/man1/setfattr.112
1 files changed, 12 insertions, 0 deletions
diff --git a/man/man1/setfattr.1 b/man/man1/setfattr.1
index 922caf2..95a885e 100644
--- a/man/man1/setfattr.1
+++ b/man/man1/setfattr.1
@@ -94,6 +94,18 @@ Print help explaining the command line options.
End of command line options.
All remaining parameters are interpreted as file names, even if they
start with a dash character.
+.SH EXAMPLES
+Add extended attribute to user namespace:
+.PP
+.nf
+.B "$ setfattr -n user.foo -v bar file.txt
+.fi
+.PP
+To add md5sum of the file as an extended attribute:
+.PP
+.nf
+.B "# setfattr -n trusted.md5sum -v d41d8cd98f00b204e00998ecf8427e file.txt
+.fi
.SH AUTHOR
Andreas Gruenbacher,
.RI < a.gruenbacher@bestbits.at >