mdsearch
1
Samba
User Commands
&doc.version;
mdsearch
Run Spotlight searches against an SMB server
mdfine
server
sharename
query
-p, --path=STRING
-L, --live
-?|--help
--usage
-d|--debuglevel=DEBUGLEVEL
--debug-stdout
--configfile=CONFIGFILE
--option=name=value
-l|--log-basename=LOGFILEBASE
--leak-report
--leak-report-full
-R|--name-resolve=NAME-RESOLVE-ORDER
-O|--socket-options=SOCKETOPTIONS
-m|--max-protocol=MAXPROTOCOL
-n|--netbiosname=NETBIOSNAME
--netbios-scope=SCOPE
-W|--workgroup=WORKGROUP
--realm=REALM
-U|--user=[DOMAIN/]USERNAME[%PASSWORD]
-N|--no-pass
--password=STRING
--pw-nt-hash
-A|--authentication-file=FILE
-P|--machine-pass
--simple-bind-dn=DN
--use-kerberos=desired|required|off
--use-krb5-ccache=CCACHE
--use-winbind-ccache
--client-protection=sign|encrypt|off
-V|--version
DESCRIPTION
This tool is part of the samba
1 suite.
mdsearch is a simple utility to run Spotlight searches against an SMB server
that runs the Spotlight mdssvc RPC service.
OPTIONS
server
The SMB server name or IP address to connect to.
sharename
The name of a share on the server.
query
The query expression syntax is a simplified form of filename
globbing familiar to shell users. Queries have the following
format:
attribute=="value"
For queries against a Samba server with Spotlight enabled using
the Elasticsearch backend, the list of supported metadata attributes
is given by the JSON attribute mapping file, typically installed at
/usr/share/samba/mdssvc/elasticsearch_mappings.json
-p PATH, --path=PATH
Server side path to search, defaults to
"/"
-L, --live
Query remains running.
&popt.autohelp;
&cmdline.common.samba.client;
&cmdline.common.credentials;
EXAMPLES
Search all indexed metadata attributes, exact match:
'*=="Samba"'
Search all indexed metadata attributes, prefix match:
'*=="Samba*"'
Search by filename:
'kMDItemFSName=="Samba*"'
Search by date:
'kMDItemFSContentChangeDate<$time.iso(2018-10-01T10:00:00Z)'
Search files's content:
'kMDItemTextContent=="Samba*"'
Expressions:
kMDItemFSName=="Samba*"||kMDItemTextContent=="Tango*"'
SEE ALSO
File Metadata Search Programming Guide
https://developer.apple.com/library/archive/documentation/Carbon/Conceptual/SpotlightQuery/Concepts/Introduction.html
VERSION
This man page is part of version &doc.version; of the Samba suite.
AUTHOR
The original Samba software and related utilities were created by
Andrew Tridgell. Samba is now developed by the Samba Team as an Open
Source project similar to the way the Linux kernel is developed.
The mdsearch manpage was written by Ralph Boehme.