Can I find files through the extended attributes

3

In Linux can I find files through the extended attributes I define? Since I can find files through its basic attributes like the file's type and others, I wonder if this is possible (because in Windows, defining extra atributes to files through Alternate Data Streams, it isn't possible to find them, at least using the Windows Search tool).

ele

Posted 2014-02-02T01:10:56.370

Reputation: 43

Answers

2

The standard version of find that comes installed as part of any Linux system cannot do this. However, some time ago I wrote a patch allowing it to search by the presence of an extended attribute. So you can download that patch, apply it to the findutils source code, then compile and install your custom version of find, and you should be able to use it to find files by extended attribute. (The patch is for findutils 4.4.0, although it might also work on the latest version, 4.4.2. If you try it, I'd be interested to get any feedback.)

There are probably other search programs that do index extended attributes, but I don't know of any. It seems to be somewhat difficult to find information on them on Google.

David Z

Posted 2014-02-02T01:10:56.370

Reputation: 5 688

1About the search programs I actually couldn't find ANY information about their abilities to index extended attributes (if there even exists programs that even do that)... If anybody knows any search programs able to to this I appreciate if you inform me, I'll have a presentation soon and wouldn't like to say that doesn't exists programs that index extended attributes without being sure. Thanks again! – ele – 2014-02-02T13:10:03.710