[opensuse] find -empty and -delete
this command works: find . -type d -empty -delete but I find no trace in find manual of these two options ("predicates"), where one can find them? thanks jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
I see in man find: TESTS -empty File is empty and is either a regular file or a directory. ACTIONS -delete Delete files; true if removal succeeded. If the removal failed, an error message is issued. If -delete fails, find's exit status will be nonzero (when it eventually exits). Use of -delete automatically turns on the `-depth' option. Warnings: Don't forget that the find command line is evaluated as an expression, so putting -delete first will make find try to delete everything below the starting points you specified. When testing a find command line that you later intend to use with -delete, you should explicitly specify -depth in order to avoid later surprises. Because -delete implies -depth, you cannot usefully use -prune and -delete together. On Mon, Jan 22, 2018 at 9:44 AM, jdd@dodin.org <jdd@dodin.org> wrote:
this command works:
find . -type d -empty -delete
but I find no trace in find manual of these two options ("predicates"), where one can find them?
thanks jdd -- http://dodin.org
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
-- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 22/01/2018 à 10:00, Roger Oberholtzer a écrit :
I see in man find:
TESTS
-empty File is empty and is either a regular file or a directory.
and I find them also now, I may have mistyped my search the first time, thanks jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Mon, Jan 22, 2018 at 10:10 AM, jdd@dodin.org <jdd@dodin.org> wrote:
Le 22/01/2018 à 10:00, Roger Oberholtzer a écrit :
I see in man find:
TESTS
-empty File is empty and is either a regular file or a directory.
and I find them also now, I may have mistyped my search the first time, thanks
No problem. I cannot count the number of time docs have simply not mentioned what I needed. Until I was shown that they did. It's a cruel game, the rules of which I have not deciphered. -- Roger Oberholtzer -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (2)
-
jdd@dodin.org
-
Roger Oberholtzer