When it comes to removing files. Instead of
rm some_file.txt
or
rm -rf some_folder
we do
del some_file.txt
or
del some_folder
where you can define your bash alias for del
in ~/.custom_aliases as
function del() {
mv $* ~/.Trash
}
which just moves your files and folders to the trash such that you can recover them later.
What’s your choice?
~/.Trash
is missing. Addmkdir -p ~ /.Trash
and use"$@"
instead of unqoted$*
. – pLumo May 28 '19 at 14:54