This is the default when there is more than one file to search. -h, --no-filename Suppress the prefixing of file names on output. This is the default when there is only one file (or only standard input) to search. --label=LABEL Display input actually coming from standard input ...
--fixed-strings PATTERN is a set of newline-separated strings-G,--basic-regexp PATTERN is a basic regular expression (BRE)-P,--perl-regexp PATTERN is a Perl regular expression-e,--regexp=PATTERN use PATTERN for matching-f,--file=FILE obtain...
--fixed-stringsPATTERNis asetofnewline-separated fixed strings-G,--basic-regexpPATTERNis a basic regularexpression(BRE)-P,--perl-regexpPATTERNis a Perl regular expression-e,--regexp=PATTERNusePATTERNformatching-f,--file=FILEobtainPATTERNfromFILE-i,--ignore-caseignorecasedistinctions...
显示三个用户root、mage、wang的UID和默认shell [root@centos7 data]# grep '^\(root\|mage\|wang\)' /etc/passwd root:x:0:0:root:/root:/bin/bash wang:x:1013:1013::/home/wang:/bin/bash mage:x:1014:1014::/home/mage:/bin/bash mageia:x:1100:1100::/home/linux:/bin/bash ##mageia用...
grep用户指南说明书
-l(小写L), --files-with-matches Suppress normal output; instead print the name of each input filefrom whichoutput would normally have been printed. The scanningwill stop on the first match. 列出文件内容符合指定的样式的文件名称。(是只找一个包含匹配的文件,还是找这些所有文件的时候,一旦发现有匹...
-L``--files-without-match:抑制正常输出,相反,打印每个输入文件的名称,其中通常不会输出任何输出文件(from which no output would normally have been printed)。每个文件的扫描在第一次匹配时停止。 -l``--files-with-matches:抑制正常输出,相反,打印每个输出文件的名称,通常从哪个输出文件打印出来(from which ...
Grep came from ed, a Unix text editor, in which the command g/re/p meant "display all text in the file that matches this." That single function became a utility itself, available on all major platforms today. This is an example of the rich family of command line functions built into ...
load minimal amounts of data from the input files and flush the output buffers more often --help display this help and exit --version output version information and exit If no -e, --expression, -f, or --file option is given, then the first ...
--exclude-from=file:跳过名称与 file 的模式相匹配的文件(使用通配符匹配,如--exclude下所述)。 --exclude-dir=glob:跳过任何名称后缀匹配模式 glob 的命令行目录。当递归搜索时,跳过其基名与 glob 匹配的任何子目录。忽略 glob 中的任何冗余结尾斜杠。