While comparing 2 fairly big directories using diff -rq .... I want to exclude certain file types like 'tar.gz' or 'error_log'.How do I do that?
Diff command with file type exceptions
command line;diff
GNU diff has options for doing this (see manual page):   -x, --exclude=PAT          exclude files that match PAT   -X, --exclude-from=FILE          exclude files that match any pattern in FILEThe pattern in each case is a glob (* for any number of characters):diff -rq -x '*.tar.gz' -x '*error_log' foo barSee for example:How do you diff a directory for only files of a specific type?How can I make 'diff -X' ignore specific paths and not file names?