i know i can use grep to find files however i am wondering what the particular difference between these common commands ? They all seems to be equal in meaning to me.
egrep
fgrep
grep
find
locate
as windows search and find command.
i know i can use grep to find files however i am wondering what the particular difference between these common commands ? They all seems to be equal in meaning to me.
egrep
fgrep
grep
find
locate
as windows search and find command.
From grep
man page, you can see:
In addition, three variant programs egrep, fgrep and rgrep are available.
egrep is the same as grep -E. fgrep is the same as grep -F. rgrep is the same
as grep -r. Direct invocation as either egrep or fgrep is deprecated, but is
provided to allow historical applications that rely on them to run unmodified.
Then:
Matcher Selection
-E, --extended-regexp
Interpret PATTERN as an extended regular expression (ERE, see below). (-E is specified by POSIX.)
-F, --fixed-strings
Interpret PATTERN as a list of fixed strings, separated by newlines, any of which is to be matched. (-F is specified by
POSIX.)
grep
– Braiam Feb 21 '14 at 04:47