大网数据广告活动
Linux 与通用命令

ctags · 常用命令示例

· 52CE 我爱测

Generate an index (or tag) file of language objects found in source files for many popular programming languages. > More information: <https://docs.ctags.io/en/latest/man/ctags.1.html>.

ctags

Generate an index (or tag) file of language objects found in source files for many popular programming languages. More information: https://docs.ctags.io/en/latest/man/ctags.1.html.

  • Generate tags for a single file and output them to a file named "tags" in the current directory, overwriting the file if it exists:

ctags

  • Generate tags for all files in the current directory and output them to a specific file, overwriting the file if it exists:

ctags -f *

  • Generate tags for all files in the current directory and all subdirectories:

ctags --recurse

  • Generate tags for a single file and output them with start line number and end line number in JSON format:

ctags --fields=+ne --output-format=json

来源:tldr-pages contributors · 作者与贡献记录 · CC BY 4.0。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
tldr-pages contributors
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。