On Wed, Apr 17, 2019 at 8:09 AM Bernhard Voelker
<m...@bernhard-voelker.de> wrote:
> This RFE is falling into a category where find(1) ought to inspect the
> content of the files in the directory hierarchy.
>
> It is already documented [1] that find(1) only works on specifics of files
> in the file system (name, size, owner, permissions, etc.), while searching
> for content is the domain of grep(1).
>
> [1] 
> https://www.gnu.org/software/findutils/manual/html_node/find_html/Contents.html#Contents
>
> IMO starting to add one of such ideas to find(1) would open a can of
> worms, like "what are my MP3 files with genre 'bluegrass'?".
> Furthermore, there are specialized tools to do that, and it contradicts
> the UNIX philosophy to not just use them.

I agree.   Find should not open the files it searches (other than directories).

Periodically, someone suggests extending findutils to add predicates
relating to extended file attributes.   A key challenge to implemeting
this is to devise a generic interface (for the user of find) which
isn't specific to one particular file system's type of file
attributes. However, perhaps if such functionality were implemented,
it would be possible for systems to add useful metadata (such as file
type or musical genre) in such a way that find could match this.

Thanks,
James.

Reply via email to