[Top][All Lists]

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

Re: Regression: "find dir/. -type d -empty -delete" claims 'unsuccessful

From: Linda Walsh
Subject: Re: Regression: "find dir/. -type d -empty -delete" claims 'unsuccessful', breaking scripts.
Date: Mon, 18 Nov 2013 17:20:50 -0800
User-agent: Thunderbird

On 18/11/2013 16:15, Eric Blake wrote:
On 11/18/2013 04:55 PM, Linda A. Walsh wrote:
In coreutils 8.21-7.1.3.

It has been standard to use "." in a directory to mean it's contents
on a recursive or copy  (compare cp -al src/. dst/.).

However, "find dir/. -type d -empty -delete"  works, but
exits with a failure code causing scripts to break.

This behavior is required by POSIX.  Sorry.
Why do you say that when the standard page doesn't mention it?

In fact, it gives examples using "." as the starting position, so it doesn't make
any logical sense that dir/. would be blocked.

It sure looks like POSIX does NOT require it. "-delete" is a gnu extension,
so it wouldn't be covered either.

There is no mention of prohibiting patterns with a "." with the "remove" function.

The only place they broke that was in "rm"...

So I ask where you get the idea that it is required by POSIX.

reply via email to

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