I accidentaly ran a find and mv command as per below to move some files with specific extensions to a directory. Unfortunately it was early and I was tired and I didn’t put and slash on the end and all the .ext files are gone and I am left with a file called ‘file’ with no extension.
find /folder -iname "*.zip" -exec mv {} /home/zip \;
Question is : How can I reverse or extract my .zip files from this ‘file’
I have tried to open with archiver, cat, tail, head and it’s just abinary output and archiver can’t extract
Note: I am on a Imac
You basically did this with your find:
And
/home/zipwasn’t a pre-existing directory. So those are just regular file renames. Each one overwriting the previous. All files except the last are dead.rm‘ed, effectively.You should be able to rename
/home/zipto something more reasonable likefoo.zipand unzip it to get the last zip file’s contents back. The others are going to require more work.You may also be interested in this Superuser question about undelete