Last active
November 21, 2017 07:57
-
-
Save theoremoon/39d75258bb6ae94e09dbc0034a2b064b to your computer and use it in GitHub Desktop.
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
| # replace rm with move | |
| gotrash() { | |
| trashdir="$HOME/trash" | |
| mkdir -p $trashdir | |
| for f in $@; do | |
| mv "$f" "${trashdir}/${f:t}_$(date +%s)" | |
| done | |
| } | |
| alias rm='gotrash' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment