linux用命令更改服务器时间
1. linux更改服务器时间:
权限:root用户才有权限更改服务器时间
使用date命令即可设置系统时间。
2. 查看系统时间
date
3. 设置当前系统时间为2015年5月8日19点48分0秒
date -s "2015-05-08 19:48:00"
4. 查看系统时间多种方式 基本上,date命令会翻译所有所有的百分号(%)开头的格式和输出在引号("")内所有的内容。
date "+%Y-%m-%d %H-%M-%S " 2017-09-20 11-06-30
date +%D 17/05/13
低调大师中文资讯倾力打造互联网数据资讯、行业资源、电子商务、移动互联网、网络营销平台。
持续更新报道IT业界、互联网、市场资讯、驱动更新,是最及时权威的产业资讯及硬件资讯报道平台。
转载内容版权归作者及来源网站所有,本站原创内容转载请注明来源。
- 上一篇
熟悉CentOS系统日志,screen工具
/var/log/messages是系统总日志,包含系统,运行时的消息状态,网络错误都会记录到这个文件中。他会隔一段时间自动切割(logrotate)。 [root@shuai-01 ~]# ls /var/log/messages* /var/log/messages /var/log/messages-20171128 /var/log/messages-20171113 /var/log/messages-20171203 /var/log/messages-20171120 logrotate自动切割日志,配置文件(/etc/logrotate.conf) [root@shuai-01 ~]# cat /etc/logrotate.conf # see "man logrotate" for details # rotate log files weekly weekly //每周切割 # keep 4 weeks worth of backlogs rotate 4 //保留4个 # create new (empty) log files...
- 下一篇
CentOS7部署ELK5.2
原文发表于cu:2017-02-10 参考文档: Elasticsearchyum文档:https://www.elastic.co/guide/en/elasticsearch/reference/current/rpm.html Logstashyum文档:https://www.elastic.co/guide/en/logstash/current/installing-logstash.html Kibanayum文档:https://www.elastic.co/guide/en/kibana/current/rpm.html es5.x版本head插件安装:http://renzhiyuan.blog.51cto.com/10433137/1888862 本文通过yum的方式安装ELK Stack各套件,并做简单配置。 一.环境准备 1.操作系统 CentOS-7-x86_64-Everything-1511 2. JDK版本 # 官方文档写得很明确:elasticsearch与logstash至少需要java 8支持,其中logstash5.x版本也不支持java ...
相关文章
文章评论
共有0条评论来说两句吧...