coreutils
[Top][All Lists]
Advanced

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

[PATCH] rm: new option (-d) to remove empty directories


From: Krzysztof Goj
Subject: [PATCH] rm: new option (-d) to remove empty directories
Date: Mon, 23 Jan 2012 13:22:53 +0100

Hi,

I created a patch adding new option to rm (-d/--dir) which allows to
remove empty directories.
You may have seen this issue being discussed in comments on Rob Pike's Google+
(https://plus.google.com/101960720994009339267/posts/3WDmR2RTTrv).

Removing empty directories by rm was default behaviour in the Research
Unix and Plan 9.
I think it's safer to add a flag and let people opt in with alias rm='rm --dir'.

It was raised in the Google+ discussion that -d flag has been added to
BSD code base in 1990.
I checked the man pages of FreeBSD, NetBSD, OpenBSD and Mac OS X and
the -d option is there.

I attach output of `git format-patch --stdout -1`, you can also
get the changes from my github (https://github.com/goj/coreutils,
rm-d branch).

This is my first patch to the coreutils, so please review it carefully.

Best regards,

-- 
Krzysztof Goj

Attachment: coreutils.patch
Description: Text Data


reply via email to

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