Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a way to determine when a binary was compiled or installed? For example, I have a binary mdrun_d, and I would like to know when this particular binary was compiled or installed. The system administrator may have recompiled or reinstalled the binary, and I would like to know if this is the case (without emailing him and bothering him with this question).

Thanks!

share|improve this question
add comment

3 Answers 3

up vote 2 down vote accepted

Run ls -l /path/to/mdrun_d and ls -lc /path/to/mdrun_d to see when the executable was last modified and when its inode was last changed. Binary executables are rarely modifed after they are compiled, so the modification is likely to indicate when the program was compiled. The ctime will be at least as recent as the last time the file was moved, so it will give an upper bound for the installation date.

share|improve this answer
add comment

Check the versions available in backup. If the binary was replaced/recompiled, the different versions will show up there. If more versions of the binary are available, you probably want to check if it happened during normal patching. Usually this logging is in /var/log, but depends on exact OS. For ubuntu it is in /var/log/dpkg.*

share|improve this answer
add comment

If you only want to see if the file has been changed from what the package originally installed, try checking if your package has a /var/lib/dpkg/info/${package_name}.md5sums and compare the m5sum in there with what your you get when you run md5sum /usr/bin/mdrun_d. In your case the package name is probably gromacs.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.