[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: something about rm



On Wed, May 16, 2012 at 07:48:56PM BST, Gary Dale wrote:
> What the F! are you doing using rm -r to umount it with rm -r?
> 
> The correct sequence of actions if you want to mount point to be
> deleted after you're done with it is:
> 
> umount ~/<mount_point>
> rmdir <mount_point>
> 
> NEVER use rm -r unless you are sure you have files in a directory
> that you want to remove. rmdir is safer for removing directories.
> Since you shouldn't have files in a mount point (although nothing
> stops you from doing so - you just can't see them when the folder is
> used as a mount point), rmdir is always appropriate.

+1 yes, I know! ;^)

One thing worth adding, put these in your alias file:

alias mv='mv -i'
alias cp='cp -i'
alias rm='rm -i'

I know it isn't much of a help now but it will save you future grief.

Cheers,
-- 
rjc


Reply to: