Linux command
mkid 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
mkid
Example
mkid [path/to/directory1] [path/to/directory2]
Example
mkid -o [path/to/database.id]
Example
mkid -i "C C++"
Exclude named files or directories
mkid -p [.git]
Example
mkid -s
说明
mkid builds an identifier database for source code files, enabling fast searches with lid, gid, and other GNU idutils tools. It scans source files, extracts identifiers (function names, variables, macros), and stores them in a compact database. The tool recursively processes directories, recognizing multiple programming languages including C, C++, assembly, Perl, and plain text. The database format optimizes lookup speed for subsequent searches.
参数
- -o, --output _outfile_
- Specify output database file; default is ID in current directory
- -f, --file _outfile_
- Alias for --output
- -i, --include _langs_
- Include only specified languages; default is C, C++, asm
- -x, --exclude _langs_
- Exclude specified languages from indexing
- -m, --lang-map _mapfile_
- Use custom filename-to-language mapping
- -d, --default-lang _lang_
- Set default language for unrecognized files
- -p, --prune _names_
- Skip named files and directories during scanning
- --files0-from _file_
- Read file list from specified file (NUL-terminated)
- -v, --verbose
- Display per-file processing statistics
- -s, --statistics
- Display summary statistics after completion
FAQ
What is the mkid command used for?
mkid builds an identifier database for source code files, enabling fast searches with lid, gid, and other GNU idutils tools. It scans source files, extracts identifiers (function names, variables, macros), and stores them in a compact database. The tool recursively processes directories, recognizing multiple programming languages including C, C++, assembly, Perl, and plain text. The database format optimizes lookup speed for subsequent searches.
How do I run a basic mkid example?
Run `mkid` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -o, --output _outfile_ do in mkid?
Specify output database file; default is ID in current directory