linux search comands

871 ワード

Linux             :
1、                :
$ grep "       "    
2、                 :
$ grep –e “     ”    
3、         :
$ grep –i "       "    
 
4、       :
$ grep -c "       "    
 
5、                 :
$ grep –v "       "    
 
6、              .log     ,     ”ERROR”  
find / -type f -name "*.log" | xargs grep "ERROR"
 
7、   :  access.log     "patrick"   
  1:grep access.log –e "patrick”
  2:find ./ –type f –name access.log | xargs grep "patrick"
tail –n 100 access.log 
 
grep -R 'patrick' /home

find /home -name '*patrick*' | more 

find /home -name "patrick"

ls -ar  |grep  patrick