Unix tip: Finding files not containing a pattern

Tagged: , ,

  • This topic is empty.
Viewing 0 reply threads
  • Author
    Posts
    • #1896
      Amit Bansal
      Keymaster

      Q. How do you find files which do not contain a specific pattern say ‘ORA-‘

      A. You can use below command

      find . -name “*log” ! -exec grep -q “ORA-” {} ; -print

Viewing 0 reply threads
  • You must be logged in to reply to this topic.