move files using find
David Henderson
dhenderson at digital-pipe.com
Thu Jul 13 21:52:36 UTC 2017
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.
Using syntax based on this post:
https://superuser.com/questions/596876/how-to-find-a-file-and-move-it-into-the-directory-it-was-found-in
But it seems like it was working in that post because it was GNU find,
not BB find. Any help to resolve this would greatly be appreciated!
Thanks,
Dave
More information about the busybox
mailing list