Sample Header Ad - 728x90

Indexing files' metadata

2 votes
1 answer
858 views
Is there a tool that allows to index (search) files based on their metadata on linux? I've search a bit and found (here ) that there are several tools that allow file indexing on linux: * Recoll * mlocate * locate-rs But it seems like none of these indexes files' metadata (or maybe I just haven't found how in the documentation). This may look as an answer, but the documentation is quite short and I can't figure if that's really what I'm looking for. I found this: GWorkspace , it doesn't look very legit but it states that it does allow metadata based indexing: > GWMetadata is the metadata indexing and search system which includes the live folders functionality. ## My goal To be a bit more precise, I would like to mimic what can (natively) be done on macOs:
# Create a file and set metadata
touch test_file.txt
xattr -w com.apple.metadata:MY_META todo test_file.txt
# Wait a few seconds for the index to update
sleep 5
# Search files that have a given metadata
mdfind "MY_META=todo"
Which returns the path of the file we just created: $(pwd)/test_file.txt. I'm looking for a tool that has a CLI interface because I need to automate things around these few commands.
Asked by cglacet (121 rep)
Jun 10, 2022, 06:17 PM
Last activity: Feb 2, 2023, 03:56 PM