---
name: "mdfind"
section: "1"
platform: "linux"
package: "mdfinder.app"
version: "1.1.0-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/mdfind"
---

# mdfind(1)

search files matching a query in GWMetadata's database

## NAME

mdfind - search files matching a query in GWMetadata's database

## SYNOPSIS

**mdfind** \[options\] *query*

## DESCRIPTION

This manual page documents briefly the **mdfind** command.

**mdfind** is a tool to search for files matching a given query.  It is part of GWMetadata, a desktop search and indexing system for GNUstep.

## OPTIONS

- **-onlyin** *'directory'*

  limits the search to “directory”

- **-s**

  reports also the score for each found path

- **-c**

  reports only the count of each found path

- **-a** *\[attribute\]*

  if “attribute” is supplied, prints the attribute description, otherwise prints the attributes list

- **-h**

  prints a help message and exits

The *query* has the format: **attribute operator value**, where “attribute” is one of the attributes used by the [**mdextractor**(1)](/mdextractor/1.md) tool when indexing (type **mdfind -a** for the attributes list), and “operator” is one of the following:

- \==

  equal

- !=

  not equal

- \<

  less than (only for numeric values and dates)

- \<=

  less than or equal (only for numeric values and dates)

- \>

  greater than (only for numeric values and dates)

- \>=

  greather than or equal (only for numeric values and dates)

Value comparison modifiers for string values:\

Appending the ‘c’ character to the search value ("value"c) makes the query case insensitive.\
 The ‘\*’ wildcard can be used to match substrings anywhere in the search value.

Combining queries:\

Queries can be combined using the ‘&&’ for *AND*, ‘\|\|’ for *OR* and parentheses to define nesting criteria.

## SEE ALSO

[**MDFinder**(1)](/MDFinder/1.md), [**GWorkspace**(1)](/GWorkspace/1.md), [**GNUstep**(7)](/GNUstep/7.md)

## AUTHORS

**mdfind** and GWMetadata were written by Enrico Sersale.

This manual page was added by Yavor Doganov \<yavor@gnu.org\> for the Debian distribution because the original program does not have one.

## COPYRIGHT

Copyright © 2014 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.
