LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-15-2006, 01:39 PM   #1
zchoyt
Member
 
Registered: Feb 2003
Location: Boise ID
Distribution: fedora
Posts: 156

Rep: Reputation: 30
grep ASCII files only


I am using grep to search recursively through a large tree. It returns more binary files which I don't care about. I looked at the man page, but it wasn't obvious how to specify ascii files only, or to exclude bins. Here is what I am using. The ascii files are not limited to *.txt however. I am searching through Visual Studio .net project heirarchies. Here is what I am using:

grep -Rn string *

There must be something like

grep -Rn -? type=ASCII string *


Thx, Zakk
 
Old 05-15-2006, 02:16 PM   #2
Dark_Helmet
Senior Member
 
Registered: Jan 2003
Posts: 2,786

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Have you tried:
Code:
grep -IRn string *
 
Old 05-16-2006, 03:55 AM   #3
muha
Member
 
Registered: Nov 2005
Distribution: xubuntu, grml
Posts: 451

Rep: Reputation: 38
(post deleted)

Last edited by muha; 05-16-2006 at 03:57 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FTP ascii mode messed up my files! :-( Ictus Linux - General 9 03-31-2006 03:19 PM
can you specify which files to grep search? sneakyimp Linux - Software 4 10-12-2005 08:28 PM
cp files from grep results Sigkill(9) Linux - Newbie 2 08-22-2005 03:17 PM
grep on Unicode files overbored Linux - Software 2 07-18-2004 01:12 PM
How to filter files in files and files which are in a sub-directory with "grep"? Piero Linux - Newbie 9 08-29-2003 02:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration