Find and copy files

If your intent is to copy the found files into /home/shantanu/tosend, you have the order of the arguments to cp reversed: find /home/shantanu/processed/ -name ‘*2011*.xml’ -exec cp “{}” /home/shantanu/tosend \; Please, note: the find command use {} as placeholder for matched file.

Find files containing a given text

egrep -ir –include=*.{php,html,js} “(document.cookie|setcookie)” . The r flag means to search recursively (search subdirectories). The i flag means case insensitive. If you just want file names add the l (lowercase L) flag: egrep -lir –include=*.{php,html,js} “(document.cookie|setcookie)” .

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)