bug-findutils
[Top][All Lists]
Advanced

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

[bug #60383] [feature-request] let find read files from stdin or file.


From: Stephane Chazelas
Subject: [bug #60383] [feature-request] let find read files from stdin or file.
Date: Sat, 4 Dec 2021 08:55:09 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:94.0) Gecko/20100101 Firefox/94.0

Follow-up Comment #18, bug #60383 (project findutils):

>  - cmd | find -files0-from - is potentially dangerous if cmd ends up being
aborted for instance because it reaches some resource limits. For instance it
was going to output /tmp/x/foo\0/tmp/x/bar\0 but got aborted just after it
wrote /tmp/x/foo\0/, find will end up searching / and if it was with -mtime
+30 -delete for instance, that could have disastrous consequences, maybe find
should only consider fully delimited records. 

About that, there's the same problem with xargs as in:


cmd | xargs -r0 rm -rf --


Could also end up removing the wrong things if cmd is interrupted. I verified
none of GNU, FreeBSD, NetBSD require a terminating \0, as in printf x | xargs
-r0 does output x\n just like printf 'x\0' | xargs -r0.

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60383>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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