Skip to content

Instantly share code, notes, and snippets.

@nvasilakis
Created July 16, 2012 20:38
Show Gist options
  • Select an option

  • Save nvasilakis/3124894 to your computer and use it in GitHub Desktop.

Select an option

Save nvasilakis/3124894 to your computer and use it in GitHub Desktop.
Some bash functions for using the trash can
function trash-show {
ls ~/.local/share/Trash/files/
}
function trash-move {
mv $* ~/.local/share/Trash/files/
}
function trash-empty {
echo -n 'Sure you want to empty trash? If yes, type "empty" >'
read n;
if [[ $n == 'empty' ]]; then
rm -rf ~/.local/share/Trash/files/
fi
}
alias rm='trash-move';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment