Gentoo Archives: gentoo-user

From: Florian Philipp <lists@××××××××××××××××××.net>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Set a property on a file and have it remove when the file is modified?
Date: Sat, 01 Mar 2008 14:19:02
Message-Id: 1204381128.5915.17.camel@NOTE_GENTOO64.PHHEIMNETZ
In Reply to: [gentoo-user] Set a property on a file and have it remove when the file is modified? by Erik
1 On Sat, 2008-03-01 at 13:40 +0100, Erik wrote:
2 > Is it possible to set a property on a file and have it remove
3 > automatically when the file is modified?
4 >
5 > Suppose that we have a style checker that checks a lot of source code
6 > files. Once it examined a file and found it to be clean, it should set a
7 > property on the file ("style-clean"). Whenever the style checker is
8 > executed it skips files with this property. Whenever the file is
9 > modified, the filesystem removes the property.
10 >
11 > Is this possible? Which filesystems does it work on?
12
13 Looks like you are looking for extended attributes:
14 http://en.wikipedia.org/wiki/Extended_attributes
15
16 But I don't think you can make them "disappear" by modifying a file.
17
18 Inotify might be a solution for that problem:
19 http://en.wikipedia.org/wiki/Inotify
20
21 Alternatively you could check the file modification times as stored by
22 default on every FS. You could use "find" for that or "ls --full-time".

Attachments

File name MIME type
signature.asc application/pgp-signature