blob: 4bc7d76149d1e012019bd9f153bba9cf4a3fc812 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/sh
# Remove a file and log the removal
removelog="/var/log/remove.log"
if [ $# -eq 0 ]; then
echo "Usage: $0 [-s] list of files or directories" >&2
exit 1
fi
if [ "$1" = "-s" ]; then
shift
else
echo "$(date): ${USER}: $*" >>$removelog
fi
rm -i "$@"
exit 0
|