The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
find excluding the hidden files arunkumar_mca UNIX for Advanced & Expert Users 3 01-27-2008 11:45 PM
Excluding files using tar cXzf sampipe UNIX for Dummies Questions & Answers 11 07-28-2005 09:46 AM
text files, ASCII files, binary files and ftp transfers Perderabo Answers to Frequently Asked Questions 0 04-08-2004 04:25 PM
Excluding Old Files on AWK !!! alexalvarenga Shell Programming and Scripting 2 01-16-2002 10:25 AM
Binary Files devildivine UNIX for Dummies Questions & Answers 1 10-16-2001 12:05 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-04-2007
user_prady user_prady is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 163
search for files excluding binary files

Hi All,

I need a solution on my following find command

find ./.. -name '*.file' -print

BTW This gives me the output as belows

./rtlsim/test/ADCONV0/infile/ad0_dagctst.file
./rtlsim/test/ADCONV0/user_command.file
./rtlsim/test/ADCONV0/simv.daidir/scsim.db.dir/scsim.db.file
./rtlsim/test/DACONV0/infile/da0_txosc_swap.file
./rtlsim/test/DACONV0/infile/da0_txosc_trim.file
./rtlsim/test/DACONV0/simv.daidir/scsim.db.dir/scsim.db.file
./rtlsim/test/RFREG/infile/rrg_sdtest_001.file
./rtlsim/test/RFREG/infile/rrg_test01.file
./rtlsim/test/RFREG/simv.daidir/scsim.db.dir/scsim.db.file
./rtlsim/test/lvdsr0/infile/lr0_sleep_002.file
./rtlsim/test/lvdsr0/user_command.file
./rtlsim/test/lvdsr0/simv.daidir/scsim.db.dir/scsim.db.file
./rtlsim/test/lvdst0/infile/lt0_LoopBack.file


My problem I dont want to search that file scsim.db.file which is a binary file but the other files except that scsim.db.file are text file.

Is there any way to search for files excluding binary files .

or pls help me to search the file with having extension .file but it should not include any other files like scsim.db.file
  #2 (permalink)  
Old 09-04-2007
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Something like this
Code:
$ find . -name "*.file" -type f -print | xargs file | grep ASCII | cut -d: -f1
Cheers,
ZB
  #3 (permalink)  
Old 09-05-2007
user_prady user_prady is offline
Registered User
  
 

Join Date: Sep 2007
Posts: 163
Quote:
Originally Posted by zazzybob View Post
Something like this
Code:
$ find . -name "*.file" -type f -print | xargs file | grep ASCII | cut -d: -f1
Cheers,
ZB
I love this site and love the people here..

Great help indeed.. Thanks..

Pradyu
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:48 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0