Project

General

Profile

Actions

Submit #2546

closed

Add an option to rm to prevent recursive rm crossing mount points

Added by jorisgio about 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
04/13/2013
Due date:
% Done:

0%

Estimated time:

Description

With null mounts, rm -r in root can be dangerous. GNU rm as an option for that :

--one-file-system
when removing a hierarchy recursively, skip
any directory that is on a file system differ‐
ent from that of the corresponding command
line argument

Here is an easy patch to add a similar option to rm.


Files

rm.patch (1.51 KB) rm.patch jorisgio, 04/13/2013 07:13 AM
Actions #1

Updated by vsrinivas about 11 years ago

Looks good.

The same logic is already present in du, for example, so it's nice to have it be in all of the base utilities.

Actions #2

Updated by swildner about 11 years ago

  • Assignee set to swildner

grab

Actions #3

Updated by swildner about 11 years ago

Pushed, thanks!

Actions #4

Updated by swildner about 11 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF