bug-coreutils
[Top][All Lists]
Advanced

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

Re: rm option to not recurse across filesystems


From: Eric Blake
Subject: Re: rm option to not recurse across filesystems
Date: Fri, 26 Dec 2008 23:06:48 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18) Gecko/20081105 Thunderbird/2.0.0.18 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Joshua Hudson on 12/26/2008 10:01 PM:
> I would suggest an option kind of like -xdev to not cross mount points
> and therefore prevent a lot of stupid disasters.
> Kind of like rm -rf / is always a bad idea, rm -rf /tmp/* while
> another filesystem is mounted in /tmp is always a bad idea.
> 
> No, I haven't made that mistake myself yet.

Thanks for the report.  However, GNU findutils already provides this ability:

find /tmp -depth -xdev -delete

It seems to me to be hard to justify adding extensions to rm when another
tool can already do the desired filtering job.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklVxfgACgkQ84KuGfSFAYCWRQCeOhnKrD5WCzu70iNC3b9Po8zr
nN4An0JEVdad6Wtqm5W1MGeolhAh/L9z
=4SX7
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]