close
diff -qr dirA dirB |grep -v -e keyword1 -e keyword2 |sort > diffs.txt

 

diff -r : recursively compare all files and files in subdirectories

diff -q : output only whether files differ

|grep -e : grep multiple keywords in one command

|grep -v : inverse grep, catch the lines not containing keywords

|sort : sort the result

 

http://hints.macworld.com/article.php?story=20070408062023352

 

好用!

arrow
arrow
    全站熱搜

    bamil 發表在 痞客邦 留言(2) 人氣()