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.

2
  • 3
    This is not a OS X specific syntax, it's the same with any find I've used. Good points: -maxdepth (espeically if path_B is a subdirectory - avoids mv trying to move files already there!) and using \; (so {} doesn't have to be the last parameter and normal mv syntax can be used) Commented Aug 26, 2019 at 1:32
  • 1
    I think @mannykary might have been referring to macOS's mv, which doesn't have -t. To work around this, you could install coreutils with Homebrew and then use gmv -t, or there are other solutions using e.g. xargs. Commented Jan 4, 2021 at 20:01