![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux
儒雅的啷当
技术分享
展开
-
Linux 下载安装配置Redis完整步骤
Linux 下载安装配置Redis完整步骤 安装:1.获取redis资源 wget http://download.redis.io/releases/redis-4.0.8.tar.gz2.解压 tar xzvf redis-4.0.8.tar.gz3.安装 cd redis-4.0.8 make cd src make instal...原创 2018-07-12 15:01:00 · 85 阅读 · 0 评论 -
Linux命令之查看cpu个数_核数_内存总数
Linux命令之查看cpu个数_核数_内存总数 http://blog.csdn.net/cgwcgw_/article/details/10000053cpu个数cat /proc/cpuinfo | grep "physical id" | uniqcpu核数cat /proc/cpuinfo | grep "cpu cores" | uniq...原创 2018-06-22 11:38:00 · 182 阅读 · 0 评论 -
编写shell时,遇到let: not found错误及解决办法
编写shell时,遇到let: not found错误及解决办法 #!/bin/bashi=1sum=0while [ $i -le 100 ]do let sum=sum+$i let i++done在写一个简单的循环脚本时,报错 let: not found,在ubuntu默认是指向bin/dash解释器的,dash是阉割版的bash,其功...原创 2018-11-26 18:26:00 · 556 阅读 · 0 评论 -
删除log日志中包含某个字符的行
删除log日志中包含某个字符的行 sed -i '/{Str}/d' abc.txt假如你的log日志中某行有sleep字符,直接输入命令: sed -i '/sleep/d' log.log如果删除的是一个变量的值,假如是var的命令:sed -i '/'"$var"'/d' abc.txt注意:在要删除的字符串俩边用"/"和"/d"包起来....原创 2018-12-03 18:32:00 · 640 阅读 · 0 评论 -
LInux查看网速带宽及各进程占用情况:nethogs
LInux查看网速带宽及各进程占用情况:nethogs 安装:#Ubuntu:sudo apt-get install nethogs#CentOS:sudo yum install nethogs使用:$ sudo nethogs posted @ 2019-01-09 19:19...原创 2019-01-09 19:19:00 · 1733 阅读 · 0 评论 -
使用Shell脚本删除/清空日志文件
使用Shell脚本删除/清空日志文件 话不多少,直接上代码:#!/bin/bashworkdir=("/home/Tax_Punish_Ret/log_txt") #可填写多个路径, 用空格隔开 # 查找日志文件for wdir in ${workdir[@]}do echo filepath is $wdir if [ $wdi...原创 2019-01-23 10:47:00 · 1793 阅读 · 0 评论 -
使用亚马逊服务器报错:Signature not yet current: 20190726T070253Z is still later than 20190726T070246Z
1.首先获取亚马逊的时间: $ curl http://s3.amazonaws.com -v2.更改当前服务器时间,使之与亚马逊时间同步 $ date -s 'xxxx-xx-xx xx:xx:xx' # 第一步中请求到的亚马逊时间...原创 2019-07-26 15:19:00 · 473 阅读 · 0 评论 -
Ubuntu下安装Jenkins
目录前提第1步 - 安装Jenkins可能会报如下错误原因分析解决办法第2步 - 开始Jenkins第3步 - 设置Jenkins**至此,Ubuntu下的Jenkins就安装成功!**前提ubuntu系统安装好jdk1.8以上版本第1步 - 安装Jenkins首先,我们将存储库密钥添加到系统。wget -q -O - https://pkg.jenkins.io/debia...转载 2019-08-21 11:41:57 · 402 阅读 · 0 评论 -
关于linux磁盘爆满定位大文件的方法
在linux较长时间运行中,往往会过短时间磁盘使用率达到98%以上,此时,如何定位占用空间较大文件的位置呢?下面将逐步排查:1. df -h此时看到/dev/vdal的占用率已经100%,严重爆满2. cd / 后执行命令: sudo du -h --max-depth=1由该命令可看到大文件在/usr下3. cd /usr 后执行命令: sudo du -h...原创 2019-09-18 15:33:03 · 1249 阅读 · 1 评论