DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: grep in unix

  1. #1
    Join Date
    Sep 2001
    Location
    UK
    Posts
    45
    how do i search in multiple directories using grep command

    and how to undo files deleted by rm command?

  2. #2
    Join Date
    Oct 2000
    Location
    Saskatoon, SK, Canada
    Posts
    3,925
    Deletion of file using rm is the final. The only way is to recover from your daily backups. For more information on grep check the man pages.

    Sam
    Thanx
    Sam



    Life is a journey, not a destination!


  3. #3
    Join Date
    Mar 2001
    Posts
    314
    to search in multiple directories combine grep with the find (or ls) command. something like the following will search in the directory tree under the present directory for a certain pattern

    $ find . -type f -print | xargs grep "pattern"

    -amar

Posting Permissions

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


Click Here to Expand Forum to Full Width