FreeBSD 9.2 RELEASE p2
I have a file dirs.txt
. In this file is a new line separated directory list like so:
/etc
/home
/home/goods/
I need to first find in all directory's files which have names like "good" or contain string "(NODES_'TASK')" and then copy all these files into the directory /tmp
.
I think must be something like:
$ find $fromDirs.txt -type f -name 'good' | \
grep -lr '\(NODES_\'TASK\'\)' $fromDirs.txt | > /tmp