在错误的订单之后,我如何恢复我的来源

时间:2021-02-05 20:16:10

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?

我运行“gcc -o程序”。c程序而不是gcc程序。c -o程序“错误地,现在我丢失了我的源代码(程序。c)。有什么办法可以恢复我的资源或者它肯定丢失了?

1 个解决方案

#1


2  

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:

~$ make program

#1


2  

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:

~$ make program