diff options
-rwxr-xr-x | clean-logs.sh | 3 | ||||
-rwxr-xr-x | rog/usr/local/bin/local-cleanup.sh | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/clean-logs.sh b/clean-logs.sh index 5d79011..2d31c87 100755 --- a/clean-logs.sh +++ b/clean-logs.sh @@ -11,6 +11,9 @@ find /var/log/ -type f -name "*.gz" -exec rm -f {} \; find /var/log/ -type f -name "*.1" -exec rm -f {} \; find /var/log/ -type f -name "*.old" -exec rm -f {} \; +# rhel like logs with 8 digit date at the end +find /var/log -type f -regextype egrep -regex ".*-[0-9]{8}$" -exec rm -f {} \; + # clean systemd's journal if [[ -d /var/log/journal || -d /run/log/journal/ ]]; then systemctl stop systemd-journald diff --git a/rog/usr/local/bin/local-cleanup.sh b/rog/usr/local/bin/local-cleanup.sh index ff79960..0033ade 100755 --- a/rog/usr/local/bin/local-cleanup.sh +++ b/rog/usr/local/bin/local-cleanup.sh @@ -1,4 +1,6 @@ #!/bin/bash -umount /mnt/d/ +umount -q /mnt/d/ +umount /mnt/e +umount /mnt/dislocker #umount /mnt/dislocker2 |