[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Regression: "find dir/. -type d -empty -delete" claims 'unsuccessful', b
Linda A. Walsh
Regression: "find dir/. -type d -empty -delete" claims 'unsuccessful', breaking scripts.
Mon, 18 Nov 2013 15:55:52 -0800
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.
Surprisingly, if one could cd to the directory, then
one can use this construct "find . -type d -empty -delete".
If the process calling 'find' is in a temporary (and deleted)
directory, it cannot "cd out of the directory" without it
This issue seems very similar to the dumbing down of "rm"
to no longer allow it to safely delete all files under a
given directory w/o deleting the directory.
While you might claim that the second form will remain supported,
there is no reason why it won't fall victim to the spreading
dysfunction in some upcoming and future release.
Can this be fixed and a patch issued in the interim?
Everytime functionality and features are removed, existing scripts
break. How does such breakage come under the
intent of POSIX to provide portability?
POSIX is dead -- it's mission to create required minimums for
supported functionality was a great idea. But new backers have
changed its mission to allow it dictating *maximum* functionality
allowed. That's not about portability any more -- it's about
taking away freedom -- something gnu shouldn't be a part of.