Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

cg(1) [debian man page]

CG(1)																	     CG(1)

NAME
cg - Recursively grep for a pattern and store it. SYNOPSIS
cg [ -l ] | [ [ -i ] pattern [ files ] ] DESCRIPTION
cg does a search though text files (usually source code) recursively for a pattern, storing matches and displaying the output in a human- readable fashion. It is intended to give some of the functionaly of AT&T's cscope(1) tool, with the advantages of simplicity and not being language-specific. The script will colorize output if configured as such. It is typically run with a Perl regular expression to search for. The search can be made case insensitive by using the -i option. A list of files may also be specified with an additional argument after the pattern. Put the files pattern in quotes to make it be matched by Perl rather than by the shell. Running the script with no arguments will recall the results of the previous search. After the search, entries found can be edited using the vg(1) script. The -l option shows the last log made. SOME EXAMPLES
cg - alone recalls the previous search results. cg -i pattern - search the default list of files for all files matching the pattern (and case-insensitively). cg pattern '*.c' - search recursively for pattern in all *.c files. This automatically converts '*' to '.*' and '.' to '.' for you and does a Perl pattern match on all files in the tree. cg pattern *.c - search through the shell-expanded list of *.c files, so not done recursively (in other words, only the files your shell pass to the script as arguments). cg -l - show the last log made. COMMAND-LINE OPTIONS -i Do a case-insensitive search. -l Show the last log made. -p Toggle the default pager option. cg has a bulit-in pager function, which can be enabled or disabled by default (in .cgvgrc). If the default is enabled, this option disables the pager; if the default is disabled, this option enables it. -P Force the built-in pager to be disabled. FILES
${HOME}/.cglast Log file of the last search. ${HOME}/.cgvgrc Per-user configuration file (if the defaults are not desireable). ${HOME}/.cgvg/* Log files in $HOSTNAME.shell_pid form with the log of the last search. SEE ALSO
vg(1), perl(1), find(1), grep(1), cscope(1) AUTHOR
cg was written by Joshua Uziel <uzi@uzix.org>. 13 Mar 2002 CG(1)

Check Out this Related Man Page

ha(1)								    HA archiver 							     ha(1)

NAME
ha - a small file archiver utility SYNOPSIS
ha <command>[<option><option>...] archive [ name ... ] DESCRIPTION
After the program name comes a command name (single letter) and options (single letters, appended to the command name without a space). COMMANDS
a[sdqemr012] Add files matching search pattern to archive. e[aqty] Extract files matching search pattern from archive. x[aqty] Extract files matching search pattern from archive using path information stored in archive. l[f] List files currently in archive. d[q] Delete files matching search pattern from archive. If archive does not contain any files after deletion it is removed. f[sdqemr012] Freshen files in archive. All files matching search pattern and newer than version already in archive are updated to archive. u[sdqemr012] Update files to archive. All files matching search pattern that are newer than version already in archive or are not yet in archive are updated to archive. t[q] Test files in archive. OPTIONS
0,1,2 Try compression method #. More than one can be specified. Methods are: 0-CPY Simple copying of files. 1-ASC Default method using sliding window dictionary followed by arithmetic coder. Offers quite good compression on wide variety of file types. 2-HSC Compression method based on finite context model and arithmetic coder. Quite slow for binary data, but offers very good compression especially for longer text files. y Assume answer yes on all questions. t Touch files when extracting. Sets file times to current machine time. r Recurse through subdirectories while searching for files matching search pattern. f Full listing of stored file information. m Move files when archiving. Files are removed from disk after they are successfully written to archive. a Set system specific file attributes when extracting files. s Find special files when archiving. e Do not store pathname information. q Quiet operation. d Make separate entries for directories. Saves information about empty directories, directory attributes etc. in archive. AUTHOR
This manual page was written by Mikhail Gusarov <dottedmag@dottedmag.net> for Debian GNU/Linux system (but may be used by others). ha 0.999p 3 Jul 2008 ha(1)
Man Page