Created Wed Sep, 18 2019 at 03:39PM

I was copying all files in one directory to another except I wanted to omit a single directory ("stunnel").

find . -path ./stunnel -prune -o -type f|while read fpath
do
if `echo $fpath|grep -q stunnel`;then echo "skipping stunnel dir"; continue; fi
echo "copying $fpath"; echo "$fpath"|cpio -pdmv /Users/jcarranza/src/devices/firewalls/pfsense/current/opt/threatstop/templates/
done