Subject: bug#12400: rmdir runs "amok", users "curse" GNU...(as rmdir has no option to stay on 1 file system)...

From: Bob Proulx <[email-masked]>
Date: Sun, 9 Sep 2012 23:14:40 -0600

Linda Walsh wrote:
> or how do I remove all the files in /tmp, but not have it descend
> into any file systems mounted in tmp?

I think it is really problematic to mount filesystems under /tmp.
That would be a really crazy situation.  I wouldn't do it.

But...

  find /tmp -xdev -mindepth 1 -delete

       -xdev  Don't descend directories on other filesystems.

The -mindepth 1 prevents it from matching /tmp itself.

Bob