table of contents
| DFM-SEARCHER(1) | User Commands | DFM-SEARCHER(1) |
NAME¶
dfm-searcher - file search tool for DDE
SYNOPSIS¶
dfm-searcher [options] <keyword> [search_path]
DESCRIPTION¶
Semantic Search:¶
- --semantic, -s
- Enable semantic natural language search Example: dfm-searcher -s "recent 3 days images" /home/user
Search Types:¶
- --type=<filename|content|ocr>
- Search type (default: filename) filename: Search by file name content: Search by file content ocr: Search by OCR text in images
Search Options:¶
- --method=<indexed|realtime>
- Search method (default: indexed)
- --query=<simple|boolean|wildcard> Query type (default: simple)
- boolean: Separate keywords with | for OR, & or , for AND
- --wildcard
- Enable wildcard search with * and ? patterns
- --case-sensitive
- Enable case sensitivity
- --include-hidden
- Include hidden files
- --pinyin
- Enable pinyin search (for filename search)
- --pinyin-acronym
- Enable pinyin acronym search (for filename search)
- --file-types=<types>
- Filter by file types, comma separated
- --file-extensions=<exts>
- Filter by file extensions, comma separated
- --exclude=<paths>
- Exclude directories from search, comma separated
- --max-results=<number>
- Maximum number of results (0 for unlimited)
- --max-preview=<length>
- Max content preview length (for content/ocr search)
- --offset=<n>
- Content offset: start reading from the n-th character (preview only, default 0)
- --filename=<keyword>
- Search by filename in content/ocr index
Time Range Filter Options:¶
- --time-field=<birth|modify>
- Time field to filter (birth=creation, modify=modification)
- --time-last=<N><unit>
- Rolling time window: N units ago to now Units: m=minutes, h=hours, d=days, w=weeks, M=months, y=years Examples: --time-last=3d (last 3 days), --time-last=2h (last 2 hours)
- --time-today
- Filter files from today
- --time-yesterday
- Filter files from yesterday
- --time-this-week
- Filter files from this week
- --time-last-week
- Filter files from last week
- --time-this-month
- Filter files from this month
- --time-last-month
- Filter files from last month
- --time-this-year
- Filter files from this year
- --time-last-year
- Filter files from last year
- --time-range=<start>,<end>
- Custom time range (format: YYYY-MM-DD or "YYYY-MM-DD HH:MM") Example: --time-range="2025-01-01,2025-12-31"
File Size Range Filter Options:¶
- --size-min=<size>
- Minimum file size (e.g., 1K, 10M, 1G, 512) Units: K=KB, M=MB, G=GB, T=TB (default: bytes)
- --size-max=<size>
- Maximum file size (e.g., 1K, 10M, 1G, 512) Units: K=KB, M=MB, G=GB, T=TB (default: bytes) Example: --size-min=1M --size-max=100M
Output Options:¶
- --json, -j
- Output results in JSON format
- --verbose, -v
- Enable verbose output with detailed result information
- --features
- List supported features and exit
- --help
- Display this help
- --version
- Show version information and exit
EXAMPLES¶
- # Basic filename search dfm-searcher "document" /home/user
- # Content search dfm-searcher --type=content "hello world" /home/user/Documents
- # OCR search in images dfm-searcher --type=ocr "screenshot" /home/user/Pictures
- # Realtime search with time filter dfm-searcher --method=realtime --time-last=7d "report" /home/user
- # Semantic search: find recent images dfm-searcher --semantic "recent 3 days images" /home/user
- # Semantic search with JSON output dfm-searcher -s -j "content contains meeting notes" /home/user
- # Filename search with file size filter (1MB to 100MB) dfm-searcher --size-min=1M --size-max=100M "video" /home/user
Content Preview (on-demand):¶
- dfm-searcher preview [<keyword>] <path1> [path2 ...] [--type=<content|ocr>] [--offset=<n>] [--max-preview=<length>] [-j] Fetch content snippets for specific files without running a full search. With keyword: returns snippet from the keyword match position (search starts at --offset). Without keyword: returns exact content starting from --offset (full content if --max-preview is omitted). Search type is auto-detected by file extension; use --type to force a specific index.
- # Fetch highlighted snippet for a single file dfm-searcher preview "hello" /home/user/doc.txt
- # Fetch full content (no keyword) dfm-searcher preview /home/user/doc.txt
- # Read content from offset 100, 50 chars max dfm-searcher preview /home/user/doc.txt --offset=100 --max-preview=50 -j
- # Search keyword from offset 150 dfm-searcher preview "keyword" /home/user/doc.txt --offset=150 -j
- # Batch fetch highlighted snippets with JSON output dfm-searcher preview "screenshot" img1.png img2.png -j
- # Force a specific search type dfm-searcher preview --type=ocr "screenshot" photo.png
| August 2026 | dfm-searcher 1.4.3 |