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

It's not even slower (and it's safe beyond the argv limit) if you use "+" instead of the semicolon.

  find -type f -exec sed -i s/foo/bar/ {} +
This only invokes the command twice for 100k files (assuming we can pass in 64k arguments to sed)


Thanks! I never knew about the + terminator.




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

Search: