Search code examples
cgccrecover

Is it possible to recover overwriten file after compilation with `-o` flag, but forgotten argument?


I ran below command to test a library and forgot to put the executable name after -o flag.

gcc -o bibarreglos.c test2.c

After that, bibarreglos.c get deleted and throw this error:

collect2.exe: error: ld returned 1 exit status.

I have the object file, is there any chance to get bibarreglos.c back?


Solution

  • Your file has been deleted and can't be restored.