grep -- print lines matching a pattern (将符合样式的该行列出) ◎语法: grep [options] PATTERN [FILE...] grep用以在file内文中比对相对应的部分,或是当没有指定档案时, 由标准输入中去比对。 在预设的情况下,grep会将符合样式的那一行列出。 此外,还有两个程式是grep的变化型,egrep及fgrep。 其中egrep就等同於grep -E ,fgrep等同於grep -F 。 ◎参数 1. -A NUM,--af...
作者: Archive 出自: http://www.linuxdiyf.com 比如查找/usr/include目录下所有*.h文件中包含"wcsncat"的行: find /usr/include -name "*.h" -exec grep "wcsncat" {} \; 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/31/showart_572491.html
grep search file or standard input for lines containing a match to regular expression regex. by default,matching lines will be displayed and nonmatching line will not be displayed. when multiple files are specified, grep displays the filename as a prefix to the output lines( use the -h to suppress filename prefixes) -c display...
linux下数据恢复 使用软件ext3grep 测试通过 # 软件下载列表 : http://code.google.com/p/ext3grep/downloads/list # 1、安装[code]01.cd /opt 02.wget http://ext3grep.googlecode.com/files/ext3grep-0.10.1.tar.gz 03.tar -zxf ext3grep-0.10.1.tar.gz 04.cd ext3grep-0.10.1 05../configure 06.make 07.make install 复制代码[/code]# 2、制造分区[code] 01.mkdir /home/sheng 02.cd /home/sheng ...
linux下数据恢复 使用软件ext3grep 测试通过 # 软件下载列表 : http://code.google.com/p/ext3grep/downloads/list # 1、安装[code]01.cd /opt 02.wget http://ext3grep.googlecode.com/files/ext3grep-0.10.1.tar.gz 03.tar -zxf ext3grep-0.10.1.tar.gz 04.cd ext3grep-0.10.1 05../configure 06.make 07.make install 复制代码[/code]# 2、制造分区[code]01.mkdir /home/sheng 02.cd /home/sheng 03.dd i...
1 什么是正规表示法: 什么是正规表示式 ( Regular Exdivssion, 底下简称 RE ) 呢?简单的说,在 linux 的环境下,我们可以透过『字符串以及一些特殊字符的辅助』来进行文字的比对工作,好来让使用者筛选自己所需要数据。 这些特殊的字符与搭配使用的工具,就构成了正规表示法的主轴! 例如 /etc/rc.d/init.d 这个目录当中好了,如果你要找到一个文件内容含有 mail 这个字符串的文件名,要怎么搜寻呢?利用 gre...
正规表示法( Regular Exdivssion,RE ) 1 什么是正规表示法: 什么是正规表示式 ( Regular Exdivssion, 底下简称 RE ) 呢?简单的说,在 linux 的环境下,我们可以透过『字符串以及一些特殊字符的辅助』来进行文字的比对工作,好来让使用者筛选自己所需要数据。 这些特殊的字符与搭配使用的工具,就构成了正规表示法的主轴! 例如 /etc/rc.d/init.d 这个目录当中好了,如果你要找到一个文件内容含有 mail 这个字符...
#> find . -type f -exec grep 'mingtian' -l {} \; grep -l :是显示匹配的内容的文件名字! 或者: #> find . -type f -name "*.*" |xargs grep 'xiaoshou' -l (这个方法 不好,挺乱的,还慢,推荐前一个方法!) 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/55630/showart_683312.html
来源:赛迪网 作者:metallica 一般病毒会主要感染/bin下面的可执行文件。 重启系统后,会停止在init version 2.85 booting 或者在出现welcome后,会告诉你/etc/rc.d/rc.sysinit的某行出现段错误。 修复系统办法: 用对应的启动光盘引导,在boot:提示符输入linux rescue 提示寻找以前安装的系统时,选择确定。 然后执行下面的命令: #cd /mnt/source #cp coreutils-4.5.3-26.i386.rpm cpio-2.5-3.i386.rpm gawk-...