查看定时任务
[root@tyzz ~]# crontab -l#secu-tcs-agent monitor, install at Tue Feb 14 11:57:11 CST 2017* * * * * /usr/local/sa/agent/secu-tcs-agent-mon-safe.sh /usr/local/sa/agent > /dev/null 2>&1*/1 * * * * /usr/local/qcloud/stargate/admin/start.sh > /dev/null 2>&1 &*/20 * * * * /usr/sbin/ntpdate ntpupdate.tencentyun.com >/dev/null &[root@tyzz ~]# crontab -u test1 -lno crontab for test1
编辑
[root@tyzz ~]# crontab -e分 时 日 月 周 所要执行的操作
图形化管理系统服务
ntsysv
chkconfig
[root@tyzz cron]# chkconfig --listNote: This output shows SysV services only and does not include native systemd services. SysV configuration data might be overridden by native systemd configuration. If you want to list systemd services use 'systemctl list-unit-files'. To see services enabled on particular target use 'systemctl list-dependencies [target]'.iprdump 0:off 1:off 2:on 3:on 4:on 5:on 6:offiprinit 0:off 1:off 2:on 3:on 4:on 5:on 6:offiprupdate 0:off 1:off 2:on 3:on 4:on 5:on 6:offnetconsole 0:off 1:off 2:off 3:off 4:off 5:off 6:offnetwork 0:off 1:off 2:on 3:on 4:on 5:on 6:off[root@tyzz cron]#
6系:[root@tyzz cron]# chkconfig httpd on7系:[root@tyzz cron]# systemctl enable httpd
[root@tyzz log]# pwd/var/log[root@tyzz log]# lsanaconda boot.log btmp-20170301 cron dmesg.old lastlog mariadb ppp spooler tuned yum.logaudit btmp chrony dmesg httpd maillog ntpstats puppet tallylog wtmp[root@tyzz log]#
dmesg 查看硬件相关的故障日志 (磁盘 网卡)
exex用法
[root@tyzz log]# find /var/log/ -type f -mtime +10 -exec cp {} {}.bak \;screen 命令
[root@tyzz ~]# screen #进入ctrl a+d 推出(打入后台)exit 完全退出[root@tyzz ~]# screen -ls #开启了的 screenThere are screens on: 20549.pts-1.tyzz (Detached) 20476.pts-1.tyzz (Detached)2 Sockets in /var/run/screen/S-root.[root@tyzz ~]# screen -r 20549 #进入相关的screen
curl
[root@tyzz ~]# curl -x 220.181.111.188:80 -I www.baidu.comHTTP/1.1 200 OKDate: Wed, 01 Mar 2017 09:32:49 GMTServer: ApacheP3P: CP=" OTI DSP COR IVA OUR IND COM "P3P: CP=" OTI DSP COR IVA OUR IND COM "Set-Cookie: BAIDUID=A35A0983905AF6C7FF97A5F979D31A17:FG=1; expires=Thu, 01-Mar-18 09:32:49 GMT; max-age=31536000; path=/; domain=.baidu.com; version=1Set-Cookie: BAIDUID=A35A0983905AF6C741F47F4511D32D76:FG=1; expires=Thu, 01-Mar-18 09:32:49 GMT; max-age=31536000; path=/; domain=.baidu.com; version=1Last-Modified: Wed, 08 Feb 2017 07:55:35 GMTETag: "1cd6-5480030886bc0"Accept-Ranges: bytesContent-Length: 7382Cache-Control: max-age=1Expires: Wed, 01 Mar 2017 09:32:50 GMTVary: Accept-Encoding,User-AgentConnection: Keep-AliveContent-Type: text/html[root@tyzz ~]# curl -Iv www.baidu.com* About to connect() to www.baidu.com port 80 (#0)* Trying 220.181.112.244...* Connected to www.baidu.com (220.181.112.244) port 80 (#0)> HEAD / HTTP/1.1> User-Agent: curl/7.29.0> Host: www.baidu.com> Accept: */*> < HTTP/1.1 200 OKHTTP/1.1 200 OK< Server: bfe/1.0.8.18Server: bfe/1.0.8.18< Date: Wed, 01 Mar 2017 09:36:36 GMTDate: Wed, 01 Mar 2017 09:36:36 GMT< Content-Type: text/htmlContent-Type: text/html< Content-Length: 277Content-Length: 277< Last-Modified: Mon, 13 Jun 2016 02:50:06 GMTLast-Modified: Mon, 13 Jun 2016 02:50:06 GMT< Connection: Keep-AliveConnection: Keep-Alive< ETag: "575e1f5e-115"ETag: "575e1f5e-115"< Cache-Control: private, no-cache, no-store, proxy-revalidate, no-transformCache-Control: private, no-cache, no-store, proxy-revalidate, no-transform< Pragma: no-cachePragma: no-cache< Accept-Ranges: bytesAccept-Ranges: bytes< * Connection #0 to host www.baidu.com left intact[root@tyzz ~]# curl -O https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo/bd_logo1_31bdc765.png % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed100 3706 100 3706 0 0 14378 0 --:--:-- --:--:-- --:--:-- 14364
-I 不显示html内容
-x 指定ip和端口
-v 显示过程
-O 下载