]> arthur.barton.de Git - backup-script.git/commitdiff
backup-audit: Enhance listing of directory changes
authorAlexander Barton <alex@barton.de>
Wed, 17 Aug 2016 13:39:28 +0000 (15:39 +0200)
committerAlexander Barton <alex@barton.de>
Wed, 17 Aug 2016 13:39:28 +0000 (15:39 +0200)
bin/backup-audit

index cec0145b0a20102c92165c5528e28bad0816716e..1aa83a7e17bc16091e11ec7d2812ad3e27008580 100755 (executable)
@@ -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() {