Discussion

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?

35 points raibosome 7 years ago 74 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton