Re: question about getfattr format

Andreas Gruenbacher <[email protected]> Thu, 16 Dec 2004 13:00:18 +0100
Newsgroups gmane.linux.file-systems.acl.devel
Organization SUSE Labs
Message-ID <[email protected]>
On Thu, 2004-12-16 at 06:07, Kenny Chamber wrote:
> ust looked at the format of getfattr -d and have the same questions:
> How are newlines handled, and does this seem to be a sensible format
> for a backup program to store extended attributes in?

Provided that you don't have an ancient version of getafttr, this is
what you get:

$ setfattr -n $'user.\newline' -v $'\newline' f
$ getfattr -d f
# file: f
user.\012ewline=0sCmV3bGluZQ==

$ getfattr -d -e hex f
# file: f
user.\012ewline=0x0a65776c696e65

$ getfattr -d -e text f
# file: f
user.\012ewline="\012ewline"

setfattr can read back any of these formats.

> One possible
> issue is that binary attributes are encoded, at best, using base64.
> But maybe this isn't worth worrying about because compression will
> bring it back down.  Again thanks for any response.

Compression will bring it down again, easily. I doubt that size matters
in this case: likely all your xattrs together will still consume only a
small amount of space.

Regards,
-- 
Andreas Gruenbacher <[email protected]>
SUSE Labs, SUSE LINUX GMBH

_______________________________________________
acl-devel mailing list
[email protected]
http://acl.bestbits.at/mailman/listinfo/acl-devel