Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: note metadata for files

On 04/07/2014 05:55, shawn wilson wrote:
> Thanks all. I didn't know of hooks... I looked for something like this
> in zsh a few years ago and didn't find anything (so didn't think to
> look for that). I also like using xattr like that way - I'm going to
> have to look into what can overwrite this though - if vim or cvs or
> even touch can overwrite this, that's kinda a non-starter unless I can
> find a way around it with cgroup or an LSM.
> On Thu, Jul 3, 2014 at 5:44 PM, Peter Stephenson
> <p.w.stephenson@xxxxxxxxxxxx> wrote:
>> On Wed, 2 Jul 2014 13:59:24 -0400
>> shawn wilson <ag4ve.us@xxxxxxxxx> wrote:
>>> Maybe not a zsh specific question, but...
>>> Does anyone have a system for attaching notes to a file?
>> You might be interested in Oliver's article on using Linux file
>> attributes for metadata with zsh:
>> http://www.linux-mag.com/id/2126/

As for xattrs, you'll want to check the XDG guidelines instead of
redefining your own:


Also, keep in mind xattrs are anything but standardized (OSX has a
different API and namespace layout (reverse DNS vs
{user.*,system.*...}), Windows (NTFS) has both xattrs and named streams...

In addition of the issues mentionned (applications forget about them
when moving things around), many filesystems either don't support them,
or use their own mangling scheme, which aren't idempotent.
And of course, if most kernels now finally support them out of the box,
in many cases the filesystems are still not mounted with them enabled by

It's really a shame because xattrs can be very useful. BeOS and Haiku
use them extensively (for storing MIME type, icons, email headers...).

In case you're interested in the xattr compatibility issue, I've written
a paper about this:
Sadly it seems nobody cares.


Messages sorted by: Reverse Date, Date, Thread, Author