Searching for a pattern string under a directory

In order to search for a pattern string in all files under a specific directory you can use following command:
find $dir -exec grep $pattern {} \; -print
just replace $dir with the directory you want to start searching in and $patter with patter you are searching for.
for example:
find /etc -exec grep support {} \; -print


Popular posts from this blog

How to set or disable auto-logout on bash shell

Setting up updates with public yum server for Oracle Enterprise Linux

Setting Filezilla Server on Amazon EC2 instance with passive ftp