On Fri, Jul 20, 2007 at 12:09:22PM -0800, Ken Irving wrote: > On Fri, Jul 20, 2007 at 12:33:34PM -0700, David Brodbeck wrote: > > rm is like a table saw. rm with the "-f" switch is like a table saw with > > the blade guard removed. Sometimes you have to use it that way, but you'd > > better be extra-careful or you'll cut your fingers off. :) > > There's a very useful feature of bash that can also help a little bit > when doing this sort of thing, unfortunately (IMHO) not the default, > where such dangerous commands can at least be kept out of the command > history buffer by preceding the command with a space. From bash(1): > > HISTCONTROL > If set to a value of ignorespace, lines which begin with a space char- > acter are not entered on the history list. If set to a value of > ... > > If you use the command history a lot (e.g., with the arrow keys or ^R), > having commands like that lurking in the history is, well, like having that > un-guarded table saw sitting there ready to accidentally cut again. Or > something...
nice. thanks A
signature.asc
Description: Digital signature