
redhat
红帽技术,认证,培训,运维等交流学习
leegong23111
这个作者很懒,什么都没留下…
展开
-
Linux 按时间批量删除文件
Linux 按时间批量删除文件(删除N天前文件)需要根据时间删除这个目录下的文件,/home/wang/dicom/studies,清理掉10天之前的无效数据。可以使用下面一条命令去完成:find /home/wang/dicom/studies-mtime +11 -name “.” -exec rm -Rf {} ;这个是根据时间删除。下面简要解释一下,这句shell命令:find /home/wang/dicom/studies -mtime +11-name “.” -exec rm -原创 2020-07-09 09:13:16 · 2593 阅读 · 0 评论 -
vim 分屏操作
$vim -On file file2 #大写O垂直分屏打开文件$vim -on file file2 #小写水平打开#n 表示分屏数,直接n等于文件个数, 如果n小于文件,按顺序打开前面的n个,如果大于,打开空编辑页面分屏快捷操作C_w + hjkl 或者方向键移动光标C_w + HJKL 移动分屏 (太多分频使用容易混乱)C_w + c 关闭当前分屏C_w + q 关闭当前分屏,如果最后一个,退出vim编辑器命令行分屏设置 : :split / :vsplit + 文件打开分屏后,可以原创 2020-05-29 15:06:12 · 232 阅读 · 0 评论 -
想查看rhel7 linux下所有的安装组
我们习惯使用 yum grouplist ,如下:[root@dbserver ~]# yum grouplistLoaded plugins: langpacks, ulninfoInstalled Environment Groups:Server with GUIAvailable Environment Groups:Minimal InstallInfrastructure ServerFile and Print ServerBasic Web ServerVirtualiz原创 2020-05-27 16:39:25 · 422 阅读 · 0 评论 -
ansible 配置文件的 优先级
优先级如下:1.首先找执行ansible命令的当前目录中,是否有 ansible.cfg文件./ansible.cfg2.如果找不到,再 找 当前用户的家目录下是否有 .ansible.cfg~/.ansible.cfg3.如果还找不到,就找 /etc/ansible/ansible.cfg/etc/ansible/ansible.cfg要检查当前使用的是哪个配置文件。ansible --version 命令中,会显示…config file = /etc/ansible/ansible原创 2020-05-19 17:16:04 · 1269 阅读 · 0 评论 -
ansible 和文件复制相关的几个模块
ansible 复制远程主机的文件到本地主机——fetch例子1:[root@centos_7 ansible]# cat fetched.ymlhosts: centos7remote_user: root tasks:name : fetched file from centos7 into localfetch:src: /tmp/fstab_from_centos6dest: /tmp/centos说明:src - 是远程主机的文件,这个参数只能使用文件,不能使用目录de原创 2020-05-17 16:51:40 · 502 阅读 · 0 评论 -
误删/var/log/messages的恢复方法
执行[root@localhost log]# lsof |grep /var/log/messages显示rsyslogd 1409 root 4w REG 253,0 112065 247 /var/log/messages[root@localhost log]# ls -al /proc/1409/fd/4l-wx------. 1 root root 64 Jun 20 19:50 /proc/1409/fd/4 -> /var/log/messages[root@原创 2020-05-15 16:51:02 · 537 阅读 · 0 评论 -
LINUX 看IO的工具 IOTOP
LINUX 下看IO,除了元生工具iostat外,可以安装另外一个工具:iotop 来看io 动作1.安装使用之前,需要先安装yum install iotop2.使用#iotop有点像 TOP哈3.用法[root@dbserver ~]# iotop -hUsage: /usr/sbin/iotop [OPTIONS]DISK READ and DISK WRITE are the block I/O bandwidth used during the samplingperiod原创 2020-05-10 18:10:17 · 351 阅读 · 0 评论