0

I use Ubuntu 14.04 x64bit Server as a Samba File Server.

I executed:

find /home/samba/* -type f -mtime -11 -exec mv /home/samba/milan {} \;

I wanted to copy files, not move.

How to bring back all the files on the old place where they were previously.

1 Answer 1

0

That command will have matched multiple files under /home/samba. The first in the list returned from find will have been replaced by the contents of /home/samba/milan. The rest of the files that were passed to -exec mv ... would of given a mv: no such file or directory error. (This is because the first -exec mv moved /home/samba/milan to the first matched file and so the subsequent ones will have got the error).

In effect you only have to restore the file returned from

find /home/samba/* -type f -mtime -11 | head -1

(which will have to be fetched from a backup).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .