查看linux系统,服务,配置文件被修改的时间

时间:2022-05-17 16:15:55

如何查看服务启动时间
[root@qike /]# ps -ef |grep nginx
root 14730 1 0 16:45 ? 00:00:00 nginx: master process
/usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf
nobody 14731 14730 0 16:45 ? 00:00:00 nginx: worker process
nobody 14732 14730 0 16:45 ? 00:00:00 nginx: worker process
root 14734 11720 0 16:45 pts/0 00:00:00 grep nginx
[root@qike /]# ps -eo pid,lstart,etime |grep 14730
如何查看服务器启动时间
[root@qike /]# uptime
16:47:11 up 21 days, 16:57, 1 user, load average: 0.00, 0.00, 0.00
如何查看配置文件被修改的时间
stat /usr/local/nginx/conf/nginx.conf
File: `/usr/local/nginx/conf/nginx.conf’
Size: 1614 Blocks: 8 IO Block: 4096 regular file
Device: fc01h/64513d Inode: 66458 Links: 1
Access: (0644/-rw-r–r–) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2015-07-08 15:47:24.000000000 +0800
Modify: 2015-07-08 15:47:24.000000000 +0800
Change: 2015-07-08 15:47:24.000000000 +0800