-2

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.

Rui F Ribeiro
  • 56,709
  • 26
  • 150
  • 232
  • There are plenty of resources out there explaining the meaning of these utilities. These might be a good start: http://www.gnu.org/software/grep/manual/grep.html, http://www.grymoire.com/Unix/Grep.html, http://cb.vu/unixtoolbox.xhtml Just use ctrl+F on your browser to find what you are looking for. – Ketan Feb 21 '14 at 03:15
  • @Ramesh the duplicated answers the first 3 while the last two are totally unrelated to grep – Braiam Feb 21 '14 at 04:47

1 Answers1

0

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.)
cuonglm
  • 153,898