move files using find

Denys Vlasenko vda.linux at googlemail.com
Fri Jul 14 08:53:32 UTC 2017


On Thu, Jul 13, 2017 at 11:52 PM, David Henderson
<dhenderson at digital-pipe.com> wrote:
> Good evening all!  I am trying to move files from one location to
> another while preserving the path.  If I search for a directory, it
> seems like I have found the correct syntax:
>
> find "/usr/local/share/man" -type d -execdir mv -- {} "/opt/test" \;
>
> However, if I try to move files, I can't seem to figure it out:
>
> find "/tmp/test" -type f \( -name \*.typelib -o -name \*.gir \)
> -execdir mv -- {} "/opt/test/" \;
>
> To which I get "No such file or directory" or "Not a directory" error.

I'm getting

    find: unrecognized: -execdir

as expected, since bbox knows nothing about find -execdir.


More information about the busybox mailing list