On 06/11/2013 05:29 PM, Tim wrote:
Never rely on that, not to mention that there are plenty of other
commands that you can foolishly hose a system with. And you may not get
that alias if you use one of the alternative shells.
Agreed. However, it can be argued that if you know enough to do that,
you should also know enough to be careful with rm. As root, unless I'm
deleting exactly one file, I use ls first to see exactly what I'm going
to delete. It's a form of "measure twice, cut once" that's prevented at
least one disaster over the years. (N.B.: once you've examined the
results of ls, the safest way to use rm is to use the up arrow to get
back the preceding command line, then edit it. That's probably the best
way to be sure that what you delete is what you listed.)