Created
December 13, 2016 08:01
-
-
Save we11adam/ff5a9fe422513b328c9d3bb0e89876d4 to your computer and use it in GitHub Desktop.
rm.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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