补丁安装时间:
# rpm -qi pacakge-name
然后查看Install Date
linux-3u0g:~ # rpm -qi timezone
Name : timezone Relocations: (not relocatable)
Version : 2012f Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Release : 0.5.1 Build Date: Fri Sep 14 18:09:04 2012
Install Date: Mon Oct 29 13:33:08 2012 Build Host: janacek
Group : System/Base Source RPM: timezone-2012f-0.5.1.src.rpm
Size : 1371879 License: BSD 3-Clause; GPL v2 or later; LGPL v2.1 or later
Signature : DSA/SHA1, Fri Sep 14 18:09:08 2012, Key ID a84edae89c800aca
Packager : http://bugs.opensuse.org
URL : http://www.gnu.org/software/libc/libc.html
Summary : Timezone descriptions
Description :
These are configuration files that describe available time zones. You
can select an appropriate time zone for your system with YaST.
Distribution: SUSE Linux Enterprise 10
linux-3u0g:~ # rpm -Uvh --force timezone-2012f-0.5.1.x86_64.rpm
Preparing... ########################################### [100%]
1:timezone ########################################### [100%]
linux-3u0g:~ #
linux-3u0g:~ # rpm -qi timezone
Name : timezone Relocations: (not relocatable)
Version : 2012f Vendor: SUSE LINUX Products GmbH, Nuernberg, Germany
Release : 0.5.1 Build Date: Fri Sep 14 18:09:04 2012
Install Date: Mon Nov 19 09:37:12 2012 Build Host: janacek
Group : System/Base Source RPM: timezone-2012f-0.5.1.src.rpm
Size : 1371879 License: BSD 3-Clause; GPL v2 or later; LGPL v2.1 or later
Signature : DSA/SHA1, Fri Sep 14 18:09:08 2012, Key ID a84edae89c800aca
Packager : http://bugs.opensuse.org
URL : http://www.gnu.org/software/libc/libc.html
Summary : Timezone descriptions
Description :
These are configuration files that describe available time zones. You
can select an appropriate time zone for your system with YaST.
Distribution: SUSE Linux Enterprise 10
linux-3u0g:~ #
另一个不太准确的方法:
linux-3u0g:~ # stat timezone-2012f-0.5.1.x86_64.rpm
File: `timezone-2012f-0.5.1.x86_64.rpm'
Size: 551994 Blocks: 1088 IO Block: 4096 regular file
Device: 805h/2053d Inode: 1026416 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-11-19 09:37:12.000000000 +0700
Modify: 2012-10-26 15:18:04.000000000 +0700
Change: 2012-10-29 13:32:59.000000000 +0700
linux-3u0g:~ #
OS第一次安装时间:
linux下,由于root、bin、daemon等账号就是在系统安装时创建的,因此这些帐号的创的时间基本上就是 Linux 系统的安装时间:
inux-3u0g:~ # passwd -S root
root PS 07/16/2012 -1 -1 -1 -1
linux-3u0g:~ # passwd -S bin
bin LK 07/16/2012 -1 -1 -1 -1
linux-3u0g:~ #
有个办法是查看 lost+found 目录状态,因为这个目录一般很少用到,改动最少(很可能无任何改动),但是如果已经改动,那么就不准确了
linux-3u0g:~ # stat /lost+found/
File: `/lost+found/'
Size: 16384 Blocks: 32 IO Block: 4096 directory
Device: 805h/2053d Inode: 11 Links: 2
Access: (0700/drwx------) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-11-16 13:46:33.000000000 +0700
Modify: 2012-07-16 16:16:16.000000000 +0700
Change: 2012-07-16 16:16:16.000000000 +0700
linux-3u0g:~ #
本文出自 “技术博客” 博客,谢绝转载!