[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64253] Suggestion - Add support for libmagic and xattr

From: raf
Subject: [bug #64253] Suggestion - Add support for libmagic and xattr
Date: Fri, 26 May 2023 19:39:27 -0400 (EDT)

Follow-up Comment #1, bug #64253 (project findutils):

Hi, As far as I know, all the versions of find that have an -xattr predicate
only allow searching by the name of the extended attribute (or perhaps just
the fact of their existence?).

I wrote a find alternative called rawhide (rh) that supports searching by
extended attribute names and values (glob or regex). So if you can't wait for
it in find, you can use rawhide. If the find developers think this is a good
idea, they are welcome to plunder rawhide for its extended attribute code. It
supports extended attributes on Linux, FreeBSD, macOS, Solaris, and Cygwin.

It doesn't support libmagic but I might add it. I wonder how useful it is. If
it is useful, it would make queries much faster than a separate file(1)
process per candidate file (but that works too). I'd like to think of some
good examples first to motivate it.

I could be wrong, but I don't think a -mime predicate adds much value. Since
mimetypes are determined by file name extension anyway, the same queries can
be done with normal globbing, and I suspect the resulting find commands would
often be shorter that way.

P.S. I don't think the emergence of .zip domains will have the effect on
operating systems that you anticipate. The use of misleading double extensions
has been around for years (e.g., "somethinginteresting.jpg                    
   .exe"). This tld development doesn't seem very different.


Reply to this item at:


Message sent via Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]