摘要: find 查找文件和目录 find 后接查找的目录,-name 后指定需要查找的文件名 文件名可以用*表示所有find /home -name "*.txt" 查找/home目录下下,所有以.txt结尾的文件或者目录 -type 查看文件类型f 文件d 目录 - exec = xargs 找到这个文 阅读全文
posted @ 2017-11-15 11:33 minger_lcm 阅读(572) 评论(0) 推荐(0)
摘要: 语句:0 0 * * * /usr/sbin/ntpdate 10.0.0.155>>/date/logs/ntp.log 2>&1 基本格式* * * * * command0 0 * * * /usr/sbin/ntpdate x.x.x.x分 时 日 月 周 命令第1列表示分钟1-59 每分钟 阅读全文
posted @ 2017-11-15 11:06 minger_lcm 阅读(324) 评论(0) 推荐(0)
摘要: tr命令常用来替换, tr命令可以对来自标准输入的字符进行替换、压缩和删除。它可以将一组字符变成另一组字符,经常用来编写优美的单行命令,作用很强大 -d, –delete 删除指定的字符, 比如 echo "i2i3ii0i3i4i9i" | tr -d [0-9], 删除字符串中所有的数字,最后输 阅读全文
posted @ 2017-11-14 12:16 minger_lcm 阅读(248) 评论(0) 推荐(0)
摘要: read 用来接收标准输入 阅读全文
posted @ 2017-11-08 15:53 minger_lcm 阅读(126) 评论(0) 推荐(0)
摘要: ping 命令用来测试主机之间网络的连通性 阅读全文
posted @ 2017-11-05 17:59 minger_lcm 阅读(112) 评论(0) 推荐(0)
摘要: [root@localhost ~]# wc /etc/passwd // 统计行数、单词数、字符数 26 49 1270 /etc/passwd [root@localhost ~]# wc -l /etc/passwd // 统计行数 26 /etc/passwd [root@localhost ~]# wc -w /etc/passwd // 统计单词数(以空白... 阅读全文
posted @ 2017-11-05 17:57 minger_lcm 阅读(192) 评论(0) 推荐(0)
摘要: tail命令 查看文件尾部 用于查看日志 默认查看文件的后10行 -n 3 数字 也可以忽略-n 直接加数字 tail 3 查看文件后3行 -f 动态实时显示文件内容 阅读全文
posted @ 2017-11-05 17:50 minger_lcm 阅读(1011) 评论(0) 推荐(0)
摘要: mkdir dir{1..3} 创建三个文件 阅读全文
posted @ 2017-11-05 17:47 minger_lcm 阅读(253) 评论(0) 推荐(0)
摘要: head 命令 读取文件的前n行 -c n 显示文件的前n个字符串 阅读全文
posted @ 2017-11-04 19:23 minger_lcm 阅读(1264) 评论(0) 推荐(0)
摘要: [root@localhost ~]# yum install -y zip unzip // 安装 zip 和 unzip [root@localhost ~]# zip 1.zip 1.txt // 压缩文件,要同时指定压缩后的文件名 [root@localhost ~]# zip -r test.zip test // 压缩目录,要同时指定压... 阅读全文
posted @ 2017-11-04 19:20 minger_lcm 阅读(164) 评论(0) 推荐(0)