Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • @unxnut What was the reason for replacing -exec sed command {} + with the much less efficient -exec sed command {} \;? Commented Jul 25, 2016 at 3:10
  • Why is + more efficient than \;? Isn't \; more portable? Commented Jul 25, 2016 at 3:13
  • 1
    I checked again and you are right. However, a better option for exec is execdir, preventing some race conditions. Commented Jul 25, 2016 at 3:34
  • 1
    @unxnut + is part of the POSIX standard Commented Jul 25, 2016 at 3:54
  • 1
    I would suggest to use find -print0|xargs -0 sed 'some sed stuff' -i, as find -exec spawns one process per file, while xargs uses one sed for all files, which is much faster if you have a lot of files. Commented Jul 25, 2016 at 14:22