summaryrefslogtreecommitdiff
path: root/logrm
blob: e760bcca899ed0fed39c6bdc5eabd8050a07b7de (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