[volunteers] Why you are careful about /dev/null operations as the root user

kevin dankwardt kevin.dankwardt at gmail.com
Thu Dec 17 08:21:08 PST 2015

Thanks for the tip about checking with the mountpoint command.

I see that rm has the option --one-file-system that if I would remember to
use I would also probably remember to umount. sigh. Maybe the
--one-file-system should be the default for rm -rf. How often do you really
want to remove things that are on different filesystems?

On Thu, Dec 17, 2015 at 8:05 AM, Sarah Newman <newmans at sonic.net> wrote:

> On 12/17/2015 08:02 AM, kevin dankwardt wrote:
> > I have found that the benefit of systemd-nspawn binding
> mounting/umounting dev,sys,proc handy. Plus when I remove the directory
> afterwards I don't
> > have to make sure I umounted the bind mounts. I've killed a machine a
> couple of times already because I forgot to undo the bind mount before
> doing a
> > rm -rf on a directory I had been using for chroot.
> I added a "! mountpoint /dir" check to one of our scripts before doing an
> rm -rf for that reason.

visit www.kcomputing.com for the best in Linux developer training.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.svlug.org/archives/volunteers/attachments/20151217/627baa03/attachment.htm

More information about the volunteers mailing list