security-misc/usr/lib/security-misc/remove-system.map
Patrick Schleizer 74293bcd2f
output
2019-11-05 01:59:25 -05:00

27 lines
581 B
Bash
Executable File

#!/bin/bash
## Copyright (C) 2012 - 2019 ENCRYPTED SUPPORT LP <adrelanos@riseup.net>
## See the file COPYING for copying conditions.
shopt -s nullglob
counter=0
for filename in /boot/System.map-* ; do
counter=$(( counter + 1 ))
done
if [ "$counter" -ge "1" ]; then
echo "Deleting system.map files..."
fi
## Removes the System.map files as they are only used for debugging or malware.
for filename in /boot/System.map-* ; do
if [ -f "${filename}" ]; then
rm --verbose --force "${filename}"
fi
done
if [ "$counter" -ge "1" ]; then
echo "Done. Success."
fi