git://git.iain.cx/iain
/
profile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Script to guess Red Hat machine's build date.
[profile.git]
/
opt
/
Linux
/
bin
/
redhat_build_date
diff --git a/opt/Linux/bin/redhat_build_date
b/opt/Linux/bin/redhat_build_date
new file mode 100755
(executable)
index 0000000..
aa234b4
--- /dev/null
+++ b/
opt/Linux/bin/redhat_build_date
@@ -0,0
+1,5
@@
+#!/usr/bin/perl
+
+use POSIX qw(strftime);
+my $date = `rpm -q --queryformat='%{INSTALLTIME}\n' basesystem`;
+printf strftime("%Y-%m-%d\n", localtime $date);