[Gllug] Tagging files on the command line?

Russell Howe rhowe at siksai.co.uk
Sun Nov 19 12:30:48 UTC 2006


On Sun, Nov 19, 2006 at 11:46:49AM +0000, Pete Ryland wrote:
> On 19/11/06, Russell Howe <rhowe at siksai.co.uk> wrote:
> >If you're interested in playing with xattrs, I have an 'md5sum'
> >replacement which uses xattrs to cache the results - I can run off
> >md5sums for a hundred gig of files in a few seconds, and the caching
> >doesn't break when I move files around.
> 
> And if I'm being nefarious I could do the following:
> 
> touch -r yourfile /tmp/foo
> edit yourfile
> touch -r /tmp/foo yourfile
> rm /tmp/foo
> 
> So I hope you're not using the md5 caching for anything important,
> like Tripwire/AIDE.

Displaying the md5sum of files in Apache directory listings, so no :)

The only 'simple' way to keep the cache valid in that case would be to have
some daemon watching for inotify events and removing the cached md5sums
whenever a file is edited. Too complicated and too much effort. May as
well just run the 'real' md5sum.

Now, if a 'volatile' namespace for xattrs were defined, which was thrown
away by the filesystem whenever a file was edited, things would be more
interesting.

-- 
Russell Howe       | Why be just another cog in the machine,
rhowe at siksai.co.uk | when you can be the spanner in the works?
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list