Options (5)
-r, --recursivebooleanRecursively scan a directory and subdirectories containing possible threats
Example:
yara {{path/to/rule.yar}} {{[-r|--recursive]}} {{path/to/directory}}-m, --print-metabooleanPrint metadata associated with the matching rules
Example:
yara {{[-m|--print-meta]}} {{path/to/rule.yar}} {{path/to/file}}-s, --print-stringsbooleanPrint the strings that caused the rule to match
Example:
yara {{[-s|--print-strings]}} {{path/to/rule.yar}} {{path/to/file}}-p, --threadsbooleanUse a specific number of threads for parallel scanning
Example:
yara {{[-p|--threads]}} {{number_of_threads}} {{path/to/rule.yar}} {{path/to/directory}}-C, --compiled-rulesbooleanUse compiled YARA rules file to scan a directory recursively
Example:
yara {{[-C|--compiled-rules]}} {{path/to/rules.bin}} {{[-r|--recursive]}} {{path/to/directory}}Examples (7)
Scan a specific file with a rule file
yara path/to/rule.yar path/to/fileRecursively scan a directory and subdirectories containing possible threats
yara path/to/rule.yar [-r|--recursive] path/to/directoryScan a running process by its PID using multiple rules
yara path/to/rule1.yar path/to/rule2.yar ... PIDPrint metadata associated with the matching rules
yara [-m|--print-meta] path/to/rule.yar path/to/filePrint the strings that caused the rule to match
yara [-s|--print-strings] path/to/rule.yar path/to/fileUse a specific number of threads for parallel scanning
yara [-p|--threads] number_of_threads path/to/rule.yar path/to/directoryUse compiled YARA rules file to scan a directory recursively
yara [-C|--compiled-rules] path/to/rules.bin [-r|--recursive] path/to/directorymade by @shridhargupta | data from tldr-pages