From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8274 invoked by alias); 4 Jul 2014 11:02:03 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 18924 Received: (qmail 6621 invoked from network); 4 Jul 2014 11:01:45 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Message-ID: <53B6870A.2050304@free.fr> Date: Fri, 04 Jul 2014 12:50:50 +0200 From: =?UTF-8?B?RnJhbsOnb2lzIFJldm9s?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130630 Icedove/17.0.7 MIME-Version: 1.0 To: zsh-users@zsh.org Subject: Re: note metadata for files References: <20140703224404.4cee3433@pws-pc.ntlworld.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 > wrote: >> On Wed, 2 Jul 2014 13:59:24 -0400 >> shawn wilson 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.