From: Alexander Barton Date: Wed, 17 Aug 2016 13:39:28 +0000 (+0200) Subject: backup-audit: Enhance listing of directory changes X-Git-Url: https://arthur.ath.cx/gitweb/?a=commitdiff_plain;h=1a71dab07655a729b522ad1fae04f13ff4d19800;p=backup-script.git backup-audit: Enhance listing of directory changes --- diff --git a/bin/backup-audit b/bin/backup-audit index cec0145..1aa83a7 100755 --- a/bin/backup-audit +++ b/bin/backup-audit @@ -70,7 +70,7 @@ ListDirectory() { local exclude - exclude='total | .$| ..$' + exclude='total ' if [[ "$dir_name" == "/" ]]; then exclude="$exclude"'| \.stamp$| dev$| etc$| proc$| root$| run$| sys$| tmp$' exclude="$exclude"'| data$| net$| srv$' @@ -78,8 +78,8 @@ ListDirectory() { fi # shellcheck disable=SC2012 - ls -al "$base_dir$dir_name" 2>/dev/null \ - | egrep -v "($exclude)" + ls -Al "$base_dir$dir_name" 2>/dev/null \ + | egrep -v "($exclude)" | awk '!($2="")' | column -t } HandleSystem() {