1.使用这种方式效率较低,而且不注意可能出现错误 find . -name "*.pc" |xargs wc -l 直接查看 total 不是正确的值。 原因: 这种方式存在一个问题,如果pc的总行数达到几百万时,会自动截断,统计出多个 total (具体原因需通过源码分析) 需要将多个total ...
分类:
系统相关 时间:
2018-02-05 18:43:32
阅读次数:
260
1、md5sum -c 可以用来批量校验,方便查看文件是否被篡改例子:find?/var/log?-type?f|xargs?md5sum?>?md5list.txt?#将每个文件的md5值输出重定向到md5list.txt文件中
#使用md5sum校验
[root@test?test]#?md5sum
分类:
Web程序 时间:
2018-02-05 15:11:02
阅读次数:
212
[root@db01 local]# find -name '*.com'|xargs egrep "qq"./tt.com:qq[root@db01 local]# find -name '*.com'./tt1.com./tt.com[root@db01 local]# find -name ' ...
分类:
其他好文 时间:
2018-02-04 13:49:27
阅读次数:
164
在linux下打开windows编辑过的文件,就会在行末尾显示^M; find -atime -print0; xargs -0 ; sed -i;
分类:
系统相关 时间:
2018-02-04 00:35:30
阅读次数:
209
因为googleapis的问题,unity3d本地帮助文档打开很慢,虽然很多网上都找出问题并给出了解决,但是只能一个个改太慢。其实可以用sed批量解决,在帮助文档文件夹下执行: ls ×.html | xargs -n 10 sed -i '/googleapis/d' 之所以不是sed -i '/ ...
分类:
编程语言 时间:
2018-02-03 21:57:32
阅读次数:
266
1、cat /dev/null test.txt txt的文件内容被清空。 2、ls | xargs rm 目录中大量文件的删除 3、查看文件夹下文件个数 ls | wc w是查看有多少个文件及文件夹 ...
分类:
系统相关 时间:
2018-02-03 17:49:30
阅读次数:
180
扩展:1. Linux日志文件总管logrotate: http://linux.cn/article-4126-1.html 2. xargs用法详解:http://blog.csdn.net/zhangfn2011/article/details/6776925 10.32 rsync通过服务同步(上)? rsync 通过
分类:
系统相关 时间:
2018-01-31 22:10:09
阅读次数:
225
mysqladmin杀死所有/指定mysql连接1.批量杀死所有mysql连接mysqladmin -uroot -pxxx processlist |awk -F '|' '{print $2}' |xargs -n 1 mysqldamin -uroot -pxxx kill2.批量杀死指定mysql连接mysqladmin -uroot -pxxx proce
分类:
数据库 时间:
2018-01-30 19:38:34
阅读次数:
184
CentOS6.8 x86_64bit mysql-5.5.57多实例安装
分类:
数据库 时间:
2018-01-29 18:19:56
阅读次数:
204