[筆記] FreeBSD find files and exclude specified path or extensions
本文于1563天之前發表,文章內容可能已經過時。
FreeBSD 10.1
找出 /zp/folder路徑下,所有包含 .doc 結尾的檔案,但是排除 AAA 目錄以及 所有 .docx 結尾的檔案
find /zp/folder -name ‘.doc‘ -not -path “AAA“ -not -name ‘.docx‘
find & rsync with full path
find /zp/folder -name ‘.doc‘ -not -path “AAA“ -not -name ‘.docx‘ -not -name ‘.wnj‘ -exec rsync -avR {} /tmp/ \;