Reputation: 21
I run "gcc -o program.c program" instead of "gcc program.c -o program" by mistake and now I lost my source (program.c). Is there any solution to regain my source or it is definitely lost?
Upvotes: 2
Views: 75
Reputation: 33533
No. It is lost, the OS overwrote your source code file.
Unless you have a backup, it is gone.
To prevent that from happening in the future, you could use make
:
~$ make program
Upvotes: 2