上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 102 下一页
摘要: find命令的参数; pathname: find命令所查找的目录路径。例如用.来表示当前目录,用/来表示系统根目录。-print: find命令将匹配的文件输出到标准输出。-exec: find命令对匹配的文件执行该参数所给出的shell命令。相应命令的形式为'command' { } \;,注意 阅读全文
posted @ 2021-06-05 22:15 Oops!# 阅读(103) 评论(0) 推荐(0)
摘要: Linux下自动删除2小时之前的日志文件 find /var/log/ -mmin +120 -name message* -exec rm -rf {} \; 执行完上面的命令后,在/var/log/目录下所有的120分钟或者说2小时以前生成的或者更改过的以message开头的日志文件都会被删掉。 阅读全文
posted @ 2021-06-04 08:00 Oops!# 阅读(1710) 评论(0) 推荐(0)
摘要: 问题介绍 近日发现公司服务器的磁盘空间越来越满,感觉快要爆掉的感觉,于是开始着手清清磁盘空间,但是找来找去,发现根目录已经使用了90%以上,可是/下的目录占的空间都非常小,始终找不到占满磁盘空间的大头在哪里。 思考解决方案 按照网上的说法,是因为文件已经删除,但是使用文件的进程还存在,导致空间无法释 阅读全文
posted @ 2021-06-03 09:50 Oops!# 阅读(672) 评论(0) 推荐(0)
摘要: 在脚本语言中,字符串的拼接(也称字符串连接或者字符串合并)往往都非常简单,例如: 在 PHP 中,使用.即可连接两个字符串; 在 JavaScript 中,使用+即可将两个字符串合并为一个。 然而,在 Shell 中你不需要使用任何运算符,将两个字符串并排放在一起就能实现拼接,非常简单粗暴。请看下面 阅读全文
posted @ 2021-06-02 17:54 Oops!# 阅读(3586) 评论(0) 推荐(0)
摘要: 使用Linux命令的awk工具 delay_avg.sh脚本内容如下所示: #!/bin/sh RESPONSEFILE=$1 if [ $# -ne 1 ] then echo "usage: ./delay_avg.sh named.response.X " else { cat $RESPON 阅读全文
posted @ 2021-05-31 14:57 Oops!# 阅读(872) 评论(0) 推荐(0)
摘要: 需求场景 将主机的2块20G的数据盘空间全部“合并”后挂载到/mnt/lvm目录下,要求文件系统格式化为xfs;已有关键信息梳理如下: 需要挂载的数据盘 /dev/vdb:20G /dev/vdc:20G 文件系统:xfs 挂载目录:/mnt/lvm 操作系统环境 OS版本:CentOS 7.5 l 阅读全文
posted @ 2021-05-08 18:05 Oops!# 阅读(656) 评论(0) 推荐(0)
摘要: 基础程序安装 # 使用yum安装 yum -y install gdisk mdadm 检查是否安装配置过RAID # 检查设备是否已经做过raid mdadm -E /dev/vd{b,c} 磁盘分区 # 对磁盘分区, gdisk /dev/vdb # 列出分区类型 L # 调整分区类型 t # 阅读全文
posted @ 2021-05-03 22:11 Oops!# 阅读(854) 评论(0) 推荐(0)
摘要: Program to print all palindromes in a given range Given a range of numbers, print all palindromes in the given range. For example if the given range i 阅读全文
posted @ 2021-04-16 16:58 Oops!# 阅读(78) 评论(0) 推荐(0)
摘要: Sometimes, while working with strings we might have a problem in which we need to perform the reverse slicing of string, i.e slicing the string for ce 阅读全文
posted @ 2021-04-16 16:02 Oops!# 阅读(91) 评论(0) 推荐(0)
摘要: Python string library does’nt support the in-built “reverse()” as done by other python containers like list, hence knowing other methods to reverse st 阅读全文
posted @ 2021-04-16 15:19 Oops!# 阅读(90) 评论(0) 推荐(0)
上一页 1 ··· 18 19 20 21 22 23 24 25 26 ··· 102 下一页