On 13.09.2013 17:43, Mark David Dumlao wrote:
On Fri, Sep 13, 2013 at 9:36 PM, Yuri K. Shatroff <yks-...@yandex.ru> wrote:
On 13.09.2013 10:24, Jean-Christophe Bach wrote:
[ ... ]
This one should work:
find /home/joseph/ -iname "*.pdf" -exec ls -l --sort=time {} +
-exec is not suitable here because it spawns a `ls` process per each found
entry; aside from being slow, this disallows sorting at all.
This is incorrect. If you terminate exec with '+' instead of '\;', only a single
instance of the command is run - the command line is built by appending
each found file to the end of the {} placeholder.
Sorry, I'm ashamed
I didn't know about this feature. Does it also handle spaces correctly?
The only reason I see for it to fail is if you have so many files that
it can't be
passed to the argv of the receiving command.
There's always an opportunity to use tempfiles ;)
--
Best wishes,
Yuri K. Shatroff