Nov 17, 17:06

copy files having search string to the target folder

let's say you have true in the hundreds of files and you need to copy only those which contain this string, it is quite easy to do with Linux find utility

grep -l -ri -m1 "Active>true" */*.xml | xargs -I {} cp {} target_folder
Share