On 2003-01-31 13:56, [EMAIL PROTECTED] wrote: > Quoting Lowell Gilbert <[EMAIL PROTECTED]>: > > [EMAIL PROTECTED] writes: > > Can you explain what you think is a problem? > > Well - it's happened to two uf us in the past month! In both cases > the operator was copying files from one drive to another and wished > to delete files from the second drive on which the copy resided. > In both cases rm -rf removed both copy AND source! :-(
You should keep a log of the commands (if possible) when things like this happen. It was probably caused by trying to `rm -fr .*' which will match all the .dotfiles in the current directory, but will also match `..', the hard link to the parent directory. This is a very easy way to delete recursively everything on the current installation when it happens in /home or /usr or other filesystems directly mounted under /, the root filesystem. > Unfortunately, rm -rf home removed home from the source /usr > directory as well! :-( I presume that this was due to /home being > a symlink to /usr/home, and somehow that link remained, so that -r > referred to everything below the symlink as well as to the directory > I was trying to remove. > > Whatever the explanation, IMHO rm -r should NOT do this by default. As far as I know, it doesn't. You should show use a minimal set of commands that reproduces the bug. This will help anyone with a bit of C knowledge to track it down in the rm(1) source and fix it. - Giorgos To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-questions" in the body of the message