First use find
as indicated above to locate the files you want to move:
find /dir/with/scattered/logs -type f
This will just print the list of files. If you're happy with it, simply use cp
with the backup option, this will "make a backup of each existing destination file". Since you said names don't matter that much that should be OK. Backed-up files will have a "~" attached to the name. See man cp
for some better control over this functionality.
find /dir/with/scattered/logs -type f -exec cp -b {} /destination/directory \;
This will copy files one by one, which is less efficient than using xargs
, but for the amount of files you mention it shouldn't be an issue.