Feature request: rm should implement option -p, --parents (original) (raw)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
From: | Guido Flohr |
---|---|
Subject: | Feature request: rm should implement option -p, --parents |
Date: | Mon, 6 Jul 2009 15:57:51 +0100 (GMT+01:00) |
Hi,
desired behavior:
$ mkdir /usr/share/myapp
$ mkdir /usr/share/myapp/pixmaps
$ mkdir /usr/share/myapp/pixmaps/8x16
$ install -m 644 icon.png /usr/share/myapp/pixmaps/8x16/
Uninstalling with clean up in such cases is a frequent task, and could be greatly simplified by:
$ rm --parents /usr/share/myapp/pixmaps/8x16/icon.png
rm: failed to remove `/usr/share': Directory not empty
$ ls /usr/share/myapp
ls: cannot access /usr/share/myapp: No such file or directory
The idea is to remove the containing directory of a file recursively, upwards, and stop that recursion on the first failure to remove a directory, most probably because of ENOTEMPTY.
The same idea could be applied to chmod, chgrp, and chown.
Cheers, Guido
- Feature request: rm should implement option -p, --parents,Guido Flohr <=
- Re: Feature request: rm should implement option -p, --parents, Pádraig Brady, 2009/07/06
* Re: Feature request: rm should implement option -p, --parents, Guido Flohr, 2009/07/06
* Re: Feature request: rm should implement option -p, --parents, Jim Meyering, 2009/07/07
* Re: Feature request: rm should implement option -p, --parents, Guido Flohr, 2009/07/07
* Re: Feature request: rm should implement option -p, --parents, Andreas Schwab, 2009/07/07
* Re: Feature request: rm should implement option -p, --parents, Pádraig Brady, 2009/07/07
* 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
- Re: Feature request: rm should implement option -p, --parents, Pádraig Brady, 2009/07/06
- Prev by Date:Re: sed command not found bug in 8.04
- Next by Date:Re: sed command not found bug in 8.04
- Previous by thread:sed command not found bug in 8.04
- Next by thread:Re: Feature request: rm should implement option -p, --parents
- Index(es):