![]() |
#1 |
FFR Veteran
![]() |
![]() gcc -o myprogram myprogram.c
./myprogram ...errors at blah blah line numbers ... ...fix those errors... rm myprogram gcc -o myprogram myprogram.c ./myprogram ....errors at blah blah line numbers... . . . ...(hours of this later)... rm myprogram.c gcc -o myprogram myprogram.c No such file or directory FUUUUUUUU |
![]() |
![]() |
![]() |
#2 |
new hand moves = dab
![]() ![]() Join Date: Dec 2002
Location: he/they
Age: 33
Posts: 10,094
|
![]() rip source code
|
![]() |
![]() |
![]() |
#3 |
FFR Veteran
![]() Join Date: Sep 2009
Age: 32
Posts: 674
|
![]() Messed up
__________________
![]() ![]() |
![]() |
![]() |
![]() |
#4 |
FFR Player
|
![]() Why aren't you using a makefile so this kind of thing doesn't happen, lmfao. Even if you only have one source file, it is a good habit to get into.
__________________
![]() |
![]() |
![]() |
![]() |
#5 | |
FFR Veteran
![]() |
![]() Quote:
I dunno -- I get sloppy sometimes when I'm just trying to throw something together. Finished what I was doing, but that oops did set me back a bit. :-P |
|
![]() |
![]() |
![]() |
#6 |
Snek
![]() ![]() Join Date: Jan 2003
Location: Kansas
Age: 34
Posts: 9,192
|
![]() I'm confused what you were trying to type in the first place that was similar to "rm".
|
![]() |
![]() |
![]() |
#7 | |
FFR Veteran
![]() |
![]() Quote:
the .c on the end was. Basically- compile code, test executable, fix code, delete executable, compile code,etc.. Except one time an accidental delete source. |
|
![]() |
![]() |
![]() |
#8 |
Snek
![]() ![]() Join Date: Jan 2003
Location: Kansas
Age: 34
Posts: 9,192
|
![]() But wouldn't recompiling already overwrite the preexisting executable?
|
![]() |
![]() |
![]() |
#9 | |
FFR Veteran
![]() |
![]() Quote:
I'm very thorough, but sometimes a bit too thorough. While this over-thoroughness bit me here, it is quite handy for things like finding and fixing bugs though. |
|
![]() |
![]() |
![]() |
#10 |
stepmania archaeologist
![]() ![]() ![]() Join Date: Aug 2005
Age: 34
Posts: 4,090
|
![]() Why didn't you use the up arrow (or similar) to copy the command you previously used? That should make it very hard to make a mistake like this.
__________________
Best AAA: Policy In The Sky [Oni] (81) Best SDG: PANTS (86) Best FC: Future Invasion (93) |
![]() |
![]() |
![]() |
#11 | |
FFR Veteran
![]() |
![]() Quote:
Again, more force of habit. I would be issuing other commands in the between time and don't really feel like sifting 5 to 10 commands back to find what I want when it's easy enough to just type it out. That said, costly typo. :-P One other thing I could do though to avoid this particular problem in the future is just allow the default name of a.out for the executable, for testing purposes, and only rename it once finished. It'd be pretty hard to accidentally delete a source code file that looks nothing like "a.out" and if I tried to remove a.out.c that file wouldn't exist and wouldn't matter. |
|
![]() |
![]() |
![]() |
#12 |
FFR Player
|
![]() The thing about makefiles is that you can just make a template one that is universal for simple directory structures (i.e. everything is in the same directory as the makefile). It isn't a big deal to just reuse it, just change GCC args and whatnot. Also, in your makefile, you can add a label to delete all object files, so you can do something like this:
make make clean If you don't want to set up source control, you could just work out of Dropbox. That way, you have rudimentary housekeeping, should you make this mistake again.
__________________
![]() Last edited by FissionMailed1; 06-3-2013 at 12:56 AM.. |
![]() |
![]() |
![]() |
#13 |
new hand moves = dab
![]() ![]() Join Date: Dec 2002
Location: he/they
Age: 33
Posts: 10,094
|
![]() I email myself code periodically. #ghettolyfe
|
![]() |
![]() |
![]() |
#14 |
I am leonid
![]() ![]() ![]() ![]() ![]() Join Date: Oct 2008
Location: MOUNTAIN VIEW
Age: 35
Posts: 8,080
|
![]() Check your recycle bin :twisted:
|
![]() |
![]() |
![]() |
#15 |
new hand moves = dab
![]() ![]() Join Date: Dec 2002
Location: he/they
Age: 33
Posts: 10,094
|
![]() oh u..........
|
![]() |
![]() |
![]() |
#16 |
Celestial Harbor
![]() ![]() ![]() ![]() |
![]() this reminds me of Toy Story 2
http://www.techdirt.com/articles/201...e-backup.shtml |
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|