Created
October 11, 2011 02:06
-
-
Save takus/1277095 to your computer and use it in GitHub Desktop.
hook script of rm
This file contains 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
#!/bin/sh | |
# hook script of rm | |
# | |
# Setup | |
# alias rm="foo/bar/rm-with-trash.sh" | |
trash=$HOME/.trash | |
if [ ! -d $trash ] | |
then | |
mkdir -p $trash | |
fi | |
for i | |
do | |
mv $i $trash | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment