Stop Using `rm` in Bash. Use `del`
We’ve all had our fair share of accidentally removing files. Instead of
rm my_file.txt
or
rm -rf my_folder
we do
del my_file.txt
or
del my_folder
where you can define your Bash alias for `del` in ~/.custom_aliases as
function del() {
mv $* ~/.Trash
}
which simply moves your files/folders to the trash such that you can recover them easily later.
What’s your alternative?
Comments URL: https://news.ycombinator.com/item?id=19412812
Points: 14
# Comments: 10
from Hacker News: Front Page https://ift.tt/2HBEaAs
via
Comments
Post a Comment