Tool for quick and easy work with large numbers of files. Mainly oriented to search for viruses in files.
- Get file-processing-tool.sh
wget https://raw.githubusercontent.com/hedgeven/file-processing-tool/master/file-processing-tool.sh
- Find files by any criteria and save result to temporary file
find . -type f -name '*.php' > php_files
or find by regexp
{ find . -type f -name '*.php'|xargs -L1 -I'f' sh -c "echo -n \"f \"; head -n1 'f' | wc -c" | awk '$2 > 256 {print $1}' ; find . -type f -name '*.php' -exec egrep 'strtoupper.*php|strtolower.*php|eval|base64|$GLOBALS|$_REQUEST|preg_replace|shell' -il {} \; ; } | sort -u > php_files
- Run file-processing-tool.sh
bash file-processing-tool.sh `cat php_files`