My cool new Blog

Hello World! This is the most epic subtitle ever.
en de

[筆記] FreeBSD find files and exclude specified path or extensions

2016-08-08 工作筆記

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/ \;

comments powered by Disqus