Re:Yes `yes no`
by huherto on Wednesday March 13, 2013 @07:55PM
(#5372021)
My friend did this...
The system response was "-i not found" or something like that.
[ Parent
| on HN ]
I once discovered that apparently
rm bob*
has completely different behavior from rm bob *
The above line of code successfully fixed a bug I'd been trying to find for weeks in source code in the same directory. When I rewrote it from scratch, the bug was gone.
Re:Yes `yes no`
by michaelmior on Thursday March 14, 2013 @12:12AM
(#5373046)
This is certainly different. " bob* " refers to all files that start with "bob". " bob * " refers to a file named bob as well as all files.
Thank you, Donny.
rm -i is your friend
I find rm -i to be unusable because it is so annoying when you are deleting more than a couple files. It would be nice if rm -I (notice the capital) would first determine all of the files to remove, print them out and then ask if you want to delete all of those files. Instead it just says "rm: remove all arguments?" which is clearly much less annoying than having to type y for every file, but it is also mostly useless.
Re:Yes `yes no`
by skateinmars on Thursday March 14, 2013 @06:41PM
(#5378104)
Zsh almost does this when using rm * :
rm /tmp/*
zsh: sure you want to delete all the files in /tmp [yn]?protip: always put -i first.
I avert the problem by having rm run interactively by default:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
http://aniggler.tumblr.com/post/44530262158/the-first-thing-...Until one day, lulled into a false sense of security, you find yourself on a system without these aliases…