Skip to content

Instantly share code, notes, and snippets.

@thesephist
Created October 24, 2018 22:47
Show Gist options
  • Save thesephist/ff10283ca83789765c2157efadb6ef1e to your computer and use it in GitHub Desktop.
Save thesephist/ff10283ca83789765c2157efadb6ef1e to your computer and use it in GitHub Desktop.
Instead of `rm`-ing files that you don't need, which doesn't leave a backup, use "trash" in the CLI
HOME_TRASH_DIR=~/.trash/
function trash () {
mkdir -p $HOME_TRASH_DIR
mv "$@" $HOME_TRASH_DIR
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment