This directory of Linux commands is from Linux in a Nutshell, 5th Edition.
Click on any of the 687 commands below to get a description and list of available options. All links in the command summaries point to the online version of the book on Safari Bookshelf.
etags [options] files
Create a list of function and macro names defined in a programming source file. etags generates tags for use by emacs. (ctags produces an equivalent tags file for use with vi.) More than one file may be specified. etags understands many programming languages, including C, C++, FORTRAN, Java, Perl, Python, flex, yacc, and bison. The output list (named TAGS by default) contains lines of the form:
name file context
where name is the function or macro name, file is the source file in which name is defined, and context is a search pattern that shows the line of code containing name. After the list of tags is created, you can invoke Emacs on any file and type:
You will be prompted for the name of the tag table; the default is TAGS. To switch to the source file associated with the name listed in tagsfile, type:
You will be prompted for the tag you would like Emacs to search for.