Skip to content

Instantly share code, notes, and snippets.

@we11adam
Created December 13, 2016 08:01
Show Gist options
  • Save we11adam/ff5a9fe422513b328c9d3bb0e89876d4 to your computer and use it in GitHub Desktop.
Save we11adam/ff5a9fe422513b328c9d3bb0e89876d4 to your computer and use it in GitHub Desktop.
rm.sh
#!/usr/bin/env bash
RM=/bin/.rm
DATE=$(date '+%Y%m%d%H%M%S')
USER=$(whoami)
CMD=$(ps -eo pid,lstart,cmd |grep $PPID |grep -v grep)
ARGS="$@"
echo "${DATE} ${USER} ${ARGS} ${CMD}" >> /tmp/rm.log
${RM} "$@"
exit $?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment