2018年4月28日
摘要: June 6, 2003 Q: When should I use Thread.getContextClassLoader() ? A: Although not frequently asked, this question is rather tough to correctly answer 阅读全文
posted @ 2018-04-28 15:13 sidesky 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 写代码时经常遇到要把 .c 和 .h的文件中的某些内容全部替换的情况,用sourceinsight 进行全局的查找是一个方法,但是sourceinsight只能替换一个文件中的字符串,不能同时替换多个文件中的同一个字符,在linux下 使用find,结合sed,xargs 可以实现这个功能。 把当前 阅读全文
posted @ 2018-04-28 14:39 sidesky 阅读(1343) 评论(0) 推荐(0) 编辑
摘要: 十六. 文件查找命令find: 下面给出find命令的主要应用示例: /> ls -l #列出当前目录下所包含的测试文件 -rw-r--r--. 1 root root 48217 Nov 12 00:57 install.log -rw-r--r--. 1 root root 37 Nov 12 阅读全文
posted @ 2018-04-28 14:34 sidesky 阅读(285) 评论(0) 推荐(0) 编辑
摘要: 1、find中的-exec参数 在当前目录下(包含子目录),查找所有txt文件并找出含有字符串"bin"的行 find ./ -name "*.txt" -exec grep "bin" {} \; 在当前目录下(包含子目录),删除所有txt文件 find ./ -name "*.txt" -exe 阅读全文
posted @ 2018-04-28 14:20 sidesky 阅读(2298) 评论(0) 推荐(0) 编辑