zsh-users
 help / color / mirror / code / Atom feed
From: "François Revol" <revol@free.fr>
To: zsh-users@zsh.org
Subject: Re: note metadata for files
Date: Fri, 04 Jul 2014 12:50:50 +0200	[thread overview]
Message-ID: <53B6870A.2050304@free.fr> (raw)
In-Reply-To: <CAH_OBife7KEUj87yOASHVi+oXuzC=uthD4w+LRWxva8E1t-b4g@mail.gmail.com>

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@ntlworld.com> wrote:
>> On Wed, 2 Jul 2014 13:59:24 -0400
>> shawn wilson <ag4ve.us@gmail.com> 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:

http://www.freedesktop.org/wiki/CommonExtendedAttributes/

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
default.

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:
http://dcevents.dublincore.org/IntConf/dc-2011/paper/view/53
Sadly it seems nobody cares.

François.


  reply	other threads:[~2014-07-04 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-02 17:59 shawn wilson
2014-07-03  7:27 ` Roman Neuhauser
2014-07-03 21:44 ` Peter Stephenson
2014-07-04  3:55   ` shawn wilson
2014-07-04 10:50     ` François Revol [this message]
2014-07-06 22:32       ` shawn wilson
2014-07-07  9:25         ` François Revol
2014-07-03 21:52 ` Mikael Magnusson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53B6870A.2050304@free.fr \
    --to=revol@free.fr \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).