#52 Feature request: --files-only and --directories-only flags
Opened by d3fault. Modified

When I run --statistics it shows me that mlocate is already differentiating between files and directories. Great! Vanilla locate doesn't appear to. Should be trivial to add flags allowing you to query --files-only or --directories-only. There are "workarounds" on StackOverflow but they are hilariously expensive in the same way that --existing is.

OT/Use-Case: I have scripts that run find and pipe the results into multimedia viewers (for audio, video, or images) and would like to cache/index the results of find. Unfortunately when I run mlocate "*" it displays directories too and I want only files. i know there are multimedia viewers with indexing built in, this is mainly for fun and I'm enjoying learning about generalized indexing in the process.
Is there an alternative tool I should be using for files only?


Metadata