博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
日常运维管理 常用命令(3)
阅读量:4326 次
发布时间:2019-06-06

本文共 4091 字,大约阅读时间需要 13 分钟。

查看定时任务

[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 下载

转载于:https://www.cnblogs.com/aallenn/p/6700579.html

你可能感兴趣的文章
ajax跨域,携带cookie
查看>>
阶段3 2.Spring_01.Spring框架简介_03.spring概述
查看>>
阶段3 2.Spring_02.程序间耦合_1 编写jdbc的工程代码用于分析程序的耦合
查看>>
阶段3 2.Spring_01.Spring框架简介_04.spring发展历程
查看>>
阶段3 2.Spring_02.程序间耦合_3 程序的耦合和解耦的思路分析1
查看>>
阶段3 2.Spring_02.程序间耦合_5 编写工厂类和配置文件
查看>>
阶段3 2.Spring_01.Spring框架简介_05.spring的优势
查看>>
阶段3 2.Spring_02.程序间耦合_7 分析工厂模式中的问题并改造
查看>>
阶段3 2.Spring_02.程序间耦合_4 曾经代码中的问题分析
查看>>
阶段3 2.Spring_03.Spring的 IOC 和 DI_2 spring中的Ioc前期准备
查看>>
阶段3 2.Spring_03.Spring的 IOC 和 DI_4 ApplicationContext的三个实现类
查看>>
阶段3 2.Spring_02.程序间耦合_8 工厂模式解耦的升级版
查看>>
阶段3 2.Spring_03.Spring的 IOC 和 DI_6 spring中bean的细节之三种创建Bean对象的方式
查看>>
阶段3 2.Spring_04.Spring的常用注解_3 用于创建的Component注解
查看>>
阶段3 2.Spring_04.Spring的常用注解_2 常用IOC注解按照作用分类
查看>>
阶段3 2.Spring_09.JdbcTemplate的基本使用_5 JdbcTemplate在spring的ioc中使用
查看>>
阶段3 3.SpringMVC·_07.SSM整合案例_02.ssm整合之搭建环境
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第1节零基础快速入门SpringBoot2.0_3、快速创建SpringBoot应用之手工创建web应用...
查看>>
阶段3 3.SpringMVC·_07.SSM整合案例_04.ssm整合之编写SpringMVC框架
查看>>
小D课堂 - 零基础入门SpringBoot2.X到实战_第1节零基础快速入门SpringBoot2.0_5、SpringBoot2.x的依赖默认Maven版本...
查看>>