Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> it doesn't launch a new process for each line like exec does

Exec doesn't either if you use "+" as a terminator:

    find . $(options) -exec command {} \;
executes one command per match,

    find . $(options) -exec command {} +
executes a single command with all matches

> exec is just an ugly hack on find

Obvious and complete nonsense, -exec is both an important predicate of find and a useful and efficient tool.

-print0/xargs -0, now that is a hack.



You apparently missed the part where I said "but far more importantly".


No, that's just your opinion and you're entitled to it so I don't care, the rest is factually incorrect.


Oh, I agree on the + thing, I wasn't aware of that option, however, it doesn't make exec any more generalizable across commands which is what matters.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: