2つの設定ファイルをいい感じに比較する

old_confnew_conf を比較する場合。

diff -u -wb  \
    <(grep -vE '^([ \t]*#|^[ \t]*$)' old_conf | sort)  \
    <(grep -vE '^([ \t]*#|^[ \t]*$)' new_conf | sort)

例: vsftpのconf比較

$ diff -u -wb  \
>     <(grep -vE '^([ \t]*#|^[ \t]*$)' old | sort)  \
>     <(grep -vE '^([ \t]*#|^[ \t]*$)' new | sort)
--- /dev/fd/63  2016-11-25 18:25:44.000000000 +0900
+++ /dev/fd/62  2016-11-25 18:25:44.000000000 +0900
@@ -1,18 +1,27 @@
+allow_writeable_chroot=YES
 anonymous_enable=NO
 ascii_download_enable=YES
 ascii_upload_enable=YES
-chroot_local_user=YES
+chmod_enable=YES
+chroot_list_enable=YES
+chroot_list_file=/etc/vsftpd/chroot_list
+chroot_local_user=NO
 connect_from_port_20=YES
 dirmessage_enable=YES
 dual_log_enable=YES
 force_dot_files=YES
-listen=NO
+listen=YES
 local_enable=YES
-local_umask=022
+local_umask=002
 pam_service_name=vsftpd
+pasv_max_port=1520
+pasv_min_port=1500
 tcp_wrappers=YES
 use_localtime=YES
+user_config_dir=/etc/vsftpd/user_conf
+userlist_deny=NO
 userlist_enable=YES
+userlist_file=/etc/vsftpd/user_list
 write_enable=YES
 xferlog_enable=YES
 xferlog_std_format=YES

参考: linux – How can I diff two config files? – Server Fault