public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Mistake
@ 2005-11-11 15:22 SPYRIDON PAPADOPOULOS
  2005-11-11 15:28 ` Mistake John Love-Jensen
  0 siblings, 1 reply; 3+ messages in thread
From: SPYRIDON PAPADOPOULOS @ 2005-11-11 15:22 UTC (permalink / raw)
  To: gcc-help

Hi,

actually simply i did the following ..mistake:
instead of typing gcc -o name name.c i typed gcc -o name.c name....
Is there something that i can do to change that?

Thank you in advance
Spiros Papadopoulos

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Mistake
  2005-11-11 15:22 Mistake SPYRIDON PAPADOPOULOS
@ 2005-11-11 15:28 ` John Love-Jensen
  2005-11-11 15:48   ` Mistake Rupert Wood
  0 siblings, 1 reply; 3+ messages in thread
From: John Love-Jensen @ 2005-11-11 15:28 UTC (permalink / raw)
  To: SP373, MSX to GCC

Hi Spiros,

> Is there something that i can do to change that?

Yes, you should put the -o just before the desired output filename
parameter.

HTH,
--Eljay

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: Mistake
  2005-11-11 15:28 ` Mistake John Love-Jensen
@ 2005-11-11 15:48   ` Rupert Wood
  0 siblings, 0 replies; 3+ messages in thread
From: Rupert Wood @ 2005-11-11 15:48 UTC (permalink / raw)
  To: 'John Love-Jensen', SP373, 'MSX to GCC'

John Love-Jensen wrote:

> > Is there something that i can do to change that?
> Yes, you should put the -o just before the desired output filename
> parameter.

I imagine he means "I just overwrote my source, can I get it back?"

I also imagine he means compiling the source, not the last binary, i.e.

    gcc -o name.c name.c

else it wouldn't work. And GCC will happily do that, I know from bitter
experience: back in my student days, late the night before a deadline on too
much coffee. So you have my sympathy.

Whether you can get the file back depends on your OS and filesystem - there
might still be a copy somewhere in unallocated space you can recover, but
I'd guess not - and your editor might have saved a last version backup if
you're using something fancy: have a quick look around your home directory
and your temporary files.

The lesson you've learned the hard way is that even when you're writing
simple stuff, only a few hours work, you still need to back it up regularly.
A good way is simple version control like a local subversion repository;
commit to it every time you make a bit of progress and write meaningful
commit comments. That's fairly cheap in terms of time and space, convenient
to use, you've got useful history if you come back to dig through later and
you've still got access to chunks of code you've since thrown away, etc.

Rup.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-11 15:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-11 15:22 Mistake SPYRIDON PAPADOPOULOS
2005-11-11 15:28 ` Mistake John Love-Jensen
2005-11-11 15:48   ` Mistake Rupert Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).