[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Feature request: rm should implement option -p, --parents
From: |
Pádraig Brady |
Subject: |
Re: Feature request: rm should implement option -p, --parents |
Date: |
Tue, 7 Jul 2009 11:40:18 +0100 |
User-agent: |
Thunderbird 2.0.0.6 (X11/20071008) |
Guido Flohr wrote:
>
> The case where the directory part is not known is quite frequent imho. I
> configured a random GNU package (in this case gettext from the current
> git sources), configured it with "--prefix=/tmp/my_gettext", then
> "make", "make install", and "make uninstall", and finally ran find over
> the directory /tmp/my_gettext. It finds 194 directories and one regular
> file (/tmp/my_gettext/share/info/dir, but that is a nuisance of its
> own). So not even packages that use GNU autoconf clean up after
> themselves. Now imagine you had to implement a cleanup mechanism. With
> "rm -p" you would simply do one check whether rm understands "-p", and
> then write to your Makefile:
>
> RM = /bin/rm -p
Thanks for persisting as you make a good point.
But I'd be worried about using rm -p generally, as I might delete an
empty dir that didn't belong to me. Though if passed relative
paths that would be alleviated I suppose.
The package above should really be calling rmdir -p on relative dirs
created previously created with install -d or mkdir -p.
On a related note see:
https://www.redhat.com/archives/fedora-maintainers/2006-October/msg00059.html
https://www.redhat.com/archives/fedora-devel-list/2009-January/msg02326.html
I'll think some more about this,
cheers,
Pádraig.
- Feature request: rm should implement option -p, --parents, Guido Flohr, 2009/07/06
- Re: Feature request: rm should implement option -p, --parents, Pádraig Brady, 2009/07/06
- Re: Feature request: rm should implement option -p, --parents,
Pádraig Brady <=
- Re: Feature request: rm should implement option -p, --parents, Guido Flohr, 2009/07/07
- Re: Feature request: rm should implement option -p, --parents, Jim Meyering, 2009/07/07
- Re: Feature request: rm should implement option -p, --parents, Ralf Wildenhues, 2009/07/07
- Re: Feature request: rm should implement option -p, --parents, Kamil Dudka, 2009/07/07