Find the answer to your Linux question:
Results 1 to 5 of 5
hello, i am new to linux....i dont know how to use "grep" command and "find" command...i searched in internet..but cant find the solution clearly...can anyone help me...what is the syntax ...
  1. #1
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    308

    [SOLVED] using grep and find command

    hello,

    i am new to linux....i dont know how to use "grep" command and "find" command...i searched in internet..but cant find the solution clearly...can anyone help me...what is the syntax to find the files using "find" command and find pattern using "grep" command.....Thanks in advance.

  2. #2
    Trusted Penguin Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,392
    use the installed manual, try:

    Code:
    man find
    man grep
    the one for grep has quite a good intro to regular expressions that can be quite helpful for beginners and experts alike.

    Incidentally you can use 'man' with any command you'd type at the prompts, most have some information about them, and there are many that help with config files too. Try, for instance, doing 'man man'.
    Linux user #126863 - see http://linuxcounter.net/

  3. #3
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    308
    yes..i got...but both "find" and "grep" seems same...what is the difference?

  4. #4
    Trusted Penguin Roxoff's Avatar
    Join Date
    Aug 2005
    Location
    Nottingham, England
    Posts
    3,392
    So you read the man pages for each and thought they were the same?

    There is some similarity between the commands, that is true. But 'find' is a tool to search the filesystem, while 'grep' is a tool to search for regular expressions in bigger streams of text.
    Linux user #126863 - see http://linuxcounter.net/

  5. #5
    Linux User
    Join Date
    Aug 2008
    Location
    Trichy,India
    Posts
    308
    ya...thank you...now i understood...thanks a lot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...