Possible Duplicate:
How to fetch ./configure parameters used at last time?
Some time ago under Centos, Bash I've compiled a program from source files. Now I need to compile with again with a new flag.
Is there any way to find out what command i used last time to compile this program under Linux Centos?
In general, you can't, that information isn't stored anywhere.
Some programs' build systems are designed to store a copy of the
configure
script invocation used to set up the build environment, but that behavior has to be written into the program. It doesn't get done automatically.If you're desperate I suppose you could always try compiling the program with different combinations of flags and just hope to find one that reproduces the program you have. Or, if you have access to the source code and know what the different options and their effects are, you could invoke the program in ways that will get it to show you those effects. (e.g. if your program had an "enable-help" compilation option you could try running it with the
-h
option to see if help had been enabled)You could just check your bash history if it is not long since you compiled the program. Some C programs embed the configuration in the binary PHP is one of those you can use strings to see that.