I wanted to move binary files from folder /myhome/sourcedir to /myhome/targetdir.I used a command find /myhome/sourcedir -type f -cmin +3 -exec mv '{}' /myhome/targetdir ';'Folder /myhome/sourcedir existed before this command executed, but folder /myhome/targetdir did not exist. I just forgot to create /myhome/targetdir.Result of this command - new file /myhome/targetdir was created. File is very big and contain lots of strange symbols ))How to restore all my files?
command find ... -exec mv ... created a file with strange content
shell;files;mv
Assume the find found 3 files: a, b, and c. This resulted in 3 commands:mv a /myhome/targetdirmv b /myhome/targetdirmv c /myhome/targetdirso, a was renamed to /myhome/targetdir, then b was renamed to /myhome/targetdir (destroying what used to be a), and then c was renamed to /myhome/targetdir, destroying what used to be b. file c is fine (it has just been renamed). The other files are in trouble. Have a look at Can overwritten files be recovered?. You  might be able to recover something.In the future, using:mv -t /myhome/targetdir '{}' Would be safer.