On Fri, Jan 31, 2003 at 01:56:54PM +1030, [EMAIL PROTECTED] typed:
> 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! :-(
> In my case I was setting up a larger hard drive from a smaller one using
> dump/restore, partition by partition. I had just completed copying one smallish
> partition and began copying the next, larger partition having forgotten to
> change directories. Naturally I soon ran out of room. ("Bother", said Pooh).
> No problem, I'll delete the wrongly copied directories from that smaller
> partition, move to the larger one, and try again. 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.
The manpage rm(1) says:
The rm utility removes symbolic links, not the files referenced by the
So what you describe shouldn't have happened.
There is one case where removing symlinks can be confusing:
rm -rf /home # removes only the symbolic link
rm -rf /home/ # removes directory tree /home is linked to
So what were the exact commands you issued?
> This message sent through Adam Internet Webmail
> To Unsubscribe: send mail to [EMAIL PROTECTED]
> with "unsubscribe freebsd-questions" in the body of the message
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message