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?
/myhome/targetdir/
. The trailing/
forces the file to be a directory. Thenmv
would have complainedmv: accessing ‘/myhome/targetdir/’: Not a directory
– Gilles 'SO- stop being evil' Apr 25 '15 at 12:51