# HG changeset patch # User František Kučera # Date 1547768143 -3600 # Node ID 6383a44578333868b7c448492e67fa15c6e53c29 # Parent 2adb6465eaddcffbfb93bb4dceb4de95a235bf89 examples: relpipe-in-filesystem – extended attributes (xattr) diff -r 2adb6465eadd -r 6383a4457833 relpipe-data/examples.xml --- a/relpipe-data/examples.xml Fri Jan 18 00:00:58 2019 +0100 +++ b/relpipe-data/examples.xml Fri Jan 18 00:35:43 2019 +0100 @@ -803,6 +803,61 @@

Tip: if we are looking for files in the current directory and want omit the „.“ we just call: find -printf '%P\0' instead of find -print0.

+ + +

Using relpipe-in-filesystem to read extended attributes

+ +

+ Extended attributes (xattr) are additional key=value pairs that can be attached to our files. + They are not stored inside the files, but on the filesystem. + Thus they are independent of particular file format (which might not support metadata) + and we can use them e.g. for tagging, cataloguing or adding some notes to our files. + Some tools like GNU Wget use extended attributes to store metadata like the original URL from which the file was downloaded. +

+ + + +

And now we know, where the files on our disk come from:

+ +
+ +

+ If we like the BeOS/Haiku style, we can create empty files with some attributes attached and use our filesystem as a simple database + and query it using relational tools. + It will lack indexing, but for basic scenarios like address book it will be fast enough + and we can feel a bit of BeOS/Haiku atmosphere in our contemporary GNU/Linux systems. + But be careful with that because some editors delete and recreate files while saving them, which destroys the xattrs. + Tools like rsync or tar with --xattrs option will backup our attributes securely. +