⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 global.1

📁 代码检索工具GLOBAL源码。可用来浏览分析LINUX源码。
💻 1
字号:
.\" This file is generated automatically by convert.pl from global/manual.in..TH GLOBAL 1 "Nov 2004" "GNU Project".SH NAMEglobal \- print the locations of specified object..SH SYNOPSIS\fBglobal\fP [-aGilnqrstTvx][-e] \fIpattern\fP.br\fBglobal\fP -c[qsv] \fIprefix\fP.br\fBglobal\fP -f[anqrstvx] \fIfiles\fP.br\fBglobal\fP -g[aGilnoqtvx][-e] \fIpattern\fP.br\fBglobal\fP -I[ailnqtvx][-e] \fIpattern\fP.br\fBglobal\fP -p[qrv].br\fBglobal\fP -P[aGilnoqtvx][-e] \fIpattern\fP.br\fBglobal\fP -u[qv].br.SH DESCRIPTION\fBGlobal\fP find the locations of specified objectin C, C++, Yacc, Java, PHP and Assembly source files.\fBGlobal\fP can treat a source tree, that is, a directory thathas subdirectories and source files.You can get the relative path of objects from anywhere within the tree.\fBGlobal\fP can locate not only function definitions but alsofunction references and other symbols.Duplicate entries are allowed..PPIn advance of using this command, you must execute \fBgtags\fP(1)at the root directory of the source tree to make tag files.Then you can execute at anywhere in the source tree..SH COMMANDSThe following commands are available:.TP\fIpattern\fPPrint object which match to the \fIpattern\fP.Extended regular expressions which are the same as thoseaccepted by \fBegrep\fP(1) are available..TP\fB-c\fP, \fB--completion\fP [\fIprefix\fP]Print candidate function names which start with specified\fIprefix\fP. \fIPrefix\fP is not specified,print all function names..TP\fB-f\fP, \fB--file\fP \fIfiles\fPPrint all function definitions in the \fIfiles\fP.This option implies -x option..TP\fB-g\fP, \fB--grep\fPPrint all lines which match to the \fIpattern\fP..TP\fB-I\fP, \fB--idutils\fPPrint all lines which match to the \fIpattern\fP.This function use \fBid-utils\fP(1) as a search engine.To use this command, you need to install \fBid-utils\fP(1)in your system and you must execute \fBgtags\fP(1)with \fB-I\fP option..TP\fB-p\fP, \fB--print-dbpath\fPPrint the location of \'GTAGS\'..TP\fB-P\fP, \fB--path\fP [\fIpattern\fP]Print the path which match to the \fIpattern\fP.If no pattern specified, print all..TP\fB-u\fP, \fB--update\fPLocate tag files and update them incrementally..TP\fB--version\fPShow version number..TP\fB--help\fPShow help..SH OPTIONSThe following options are available:.TP\fB-a\fP, \fB--absolute\fPPrint absolute path name. By default, print relative path name..TP\fB-e\fP, \fB--regexp\fP \fIpattern\fPUse \fIpattern\fP as the pattern; useful to protect  patternsbeginning with -..TP\fB-G\fP, \fB--basic-regexp\fPInterpret \fIpattern\fP as a  basic regular expression.The default is extended regular expression.This option is valid for the \fB-g\fP and \fB-P\fP command..TP\fB-i\fP, \fB--ignore-case\fPignore case distinctions in pattern..TP\fB-l\fP, \fB--local\fPPrint just objects which exist under the current directory..TP\fB-n\fP, \fB--nofilter\fPSuppress sort filter and path conversion filter..TP\fB-o\fP, \fB--other\fPSearch pattern in not only source files but also other fileslike \'README\'.This option is valid only with \fB-g\fP or \fB-P\fP command..TP\fB-q\fP, \fB--quiet\fPQuiet mode..TP\fB-r\fP, \fB--reference\fP, \fB--rootdir\fPPrint the locations of object references.By default, print object definitions.With the \fB-p\fP option, print the root directory of source tree..TP\fB-s\fP, \fB--symbol\fPPrint the locations of specified symbol other than function names.You need \'GSYMS\' tags file. See \fBgtags\fP(1)..TP\fB-t\fP, \fB--tags\fPPrint with standard ctags format..TP\fB-T\fP, \fB--through\fPGo through all the tag files listed in \fBGTAGSLIBPATH\fP.By default, stop searching when tag is found.This option is ignored when either \fB-s\fP, \fB-r\fPor \fB-l\fP option is specified..TP\fB-v\fP, \fB--verbose\fPVerbose mode..TP\fB-x\fP, \fB--cxref\fPIn addition to the default output, produce the line number andthe line contents..SH EXAMPLES.nf	$ ls -F	Makefile      src/    lib/	$ gtags	$ global main	src/main.c	$ global -x main	main              10 src/main.c  main (argc, argv) {	$ global -x '^[sg]et'	set_num           20 lib/util.c  set_num(values)	get_num           30 lib/util.c  get_num() {	$ global -rx '^[sg]et'	set_num          113 src/op.c            set_num(32);	set_num          225 src/opop.c               if (set_num(0) > 0) {	get_num           90 src/op.c            while (get_num() > 0) {	$ cd lib	$ global -rx '^[sg]et'	set_num          113 ../src/op.c            set_num(32);	set_num          225 ../src/opop.c               if (set_num(0) > 0) {	get_num           90 ../src/op.c            while (get_num() > 0) {	$ global strlen	$ (cd /usr/src/sys; gtags)	$ export GTAGSLIBPATH=/usr/src/sys	$ global strlen	../../../usr/src/sys/libkern/strlen.c	$ (cd /usr/src/lib; gtags)	$ GTAGSLIBPATH=/usr/src/lib:/usr/src/sys	$ global strlen	../../../usr/src/lib/libc/string/strlen.c.fi.SH FILES.TP\'GTAGS\'Tag file for function definitions..TP\'GRTAGS\'Tag file for function references..TP\'GSYMS\'Tag file for other symbols..TP\'GPATH\'Tag file for path of source files..TP\'GTAGSROOT\'If environment variable \fBGTAGSROOT\fP is not set and \'GTAGSROOT\' existin the same directory with \'GTAGS\' then use the valueas \fBGTAGSROOT\fP..TP\'/etc/gtags.conf\', \'$HOME/.globalrc\'Configuration file..SH ENVIRONMENTThe following environment variables affect the execution of \fBglobal\fP:.TP\fBGTAGSROOT\fPThe directory which is the root of source tree..TP\fBGTAGSDBPATH\fPThe directory on which gtags database exist.This value is ignored when \fBGTAGSROOT\fP is not defined..TP\fBGTAGSLIBPATH\fPIf this variable is set, it is used as the path to searchfor library functions. If the specified function is notfound in a source tree, \fBglobal\fP also search in these paths..TP\fBGTAGSLABEL\fPIf this variable is set, its value is used as the labelof configuration file. The default is default..SH CONFIGURATIONThe following configuration variables affect the execution of \fBglobal\fP:.TPicase_path(boolean)Ignore case distinctions in the \fIpattern\fP..SH DIAGNOSTICS\fBGlobal\fP exits with a non 0 value if an error occurred, 0 otherwise..SH "SEE ALSO"\fBgtags-parser\fP(1),\fBgtags\fP(1),\fBhtags\fP(1),\fBless\fP(1)..PPGNU GLOBAL source code tag system.br(http://www.gnu.org/software/global/)..SH AUTHORTama Communications Corporation..SH HISTORYThe \fBglobal\fP command appeared in FreeBSD 2.2.2.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -