Skip to content

Instantly share code, notes, and snippets.

@takus
Created October 11, 2011 02:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takus/1277095 to your computer and use it in GitHub Desktop.
Save takus/1277095 to your computer and use it in GitHub Desktop.
hook script of rm
#!/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