[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated syml
From: |
Bernhard Voelker |
Subject: |
bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir |
Date: |
Wed, 05 Sep 2012 08:41:34 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120825 Thunderbird/15.0 |
On 09/05/2012 08:25 AM, Paul Eggert wrote:
> On 09/04/2012 06:55 PM, Linda A. Walsh wrote:
>
>> So how do delete all files in the directory without wild cards?
>
> Why tie your hands behind your back? Use wild cards:
>
> cd DIRECTORY && rm -fr * .[!.] .??*
>
> If you do this a lot, put it into a shell script.
> It's not like the need is all that common, for most people,
> but if you need it that's what scripts are for.
>
> If you fiddle with your shell settings about
> how wildcards are expanded, make
> sure your script does wildcards in the standard way.
Exactly, we're now at the point where globbing is the topic,
much way away from coreutils and rm.
Bash knows dotglob:
$ mkdir d ; cd d
$ touch .a b ; mkdir c
$ ( shopt -s dotglob ; rm -rv * )
removed `.a'
removed `b'
removed directory: `c'
Have a nice day,
Berny
- bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it is documented to do so., (continued)
bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Linda A. Walsh, 2012/09/04
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Eric Blake, 2012/09/04
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Paul Eggert, 2012/09/04
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Linda A. Walsh, 2012/09/04
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Paul Eggert, 2012/09/04
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Linda A. Walsh, 2012/09/04
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Paul Eggert, 2012/09/05
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir,
Bernhard Voelker <=
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Linda A. Walsh, 2012/09/05
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Paul Eggert, 2012/09/05
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Linda A. Walsh, 2012/09/05
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Paul Eggert, 2012/09/05
- bug#12339: [PATCH] rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir, Linda Walsh, 2012/09/05
bug#12339: Bug: rm -fr . doesn't dir depth first deletion yet it is documented to do so., Bernhard Voelker, 2012/09/06
bug#12339: Gnu rm, changed only recently (4-5 years), and didn't follow letter of posix...(statement follows), Linda Walsh, 2012/09/12