summaryrefslogtreecommitdiff
path: root/logrm
blob: f139f82521cde66434248123095dff6165b09163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh

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