I needed to find and collect all log files of a product, but I wanted to keep the directory structure they where in, so find wasn’t really the solution. Our rsync friend does the job much better :
rsync -avm –include=*/ –include=*.log –exclude=* /opt/product .
all log files under /opt/product will be collected locally, with their containing directory structure. Rsync rocks !
Post a Comment