I made a mistake when moving a set of file by this command mv src/* .. instead of mv src/* .

link|improve this question

52% accept rate
feedback

3 Answers

up vote 7 down vote accepted

You can try using find to discover which files in ".." was modified at the time you made the erroneous mv, and then mv them in the right place again (using -exec find option for example).

link|improve this answer
Thanks for your suggestion ! I use this command find ../* -mmin -5 -type f -exec mv '{}' . ; I saw that it mv all the file in parent directory include file're not modified. Do you have any ideas for this command ? – billyduc Sep 10 '09 at 2:57
feedback

You cannot 'undo' it easily other than by sorting out which files belong where and to move them back again. Alternatively, you could restore from a backup and then compare the files from the backup and the present system to help.

link|improve this answer
feedback

I don't think there's any. Same goes with rm, which is different from trashing.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.