Mike,

You are right. Some files on our server which I believe are plain text files
turn out to be "data", based on what "file" command shows. Weird! These
files were moved from AIX system to the current Red Hat system,  could this
have something to with the file type?

Thank you.

Zhao

On 3/26/07, mike ledoux <[EMAIL PROTECTED]> wrote:

> Steven's solution (listed below) only partially works, for reasons I
don't
> know. By "partially", I mean his solution can only find SOME files
matching
> the search criteria.
>
> find . -type f -name \*out\* | \
> xargs file | \
> awk '/ASCII/ { sub(/:/, ""); print $1}' | \
> xargs grep -l zip > zip.txt

If you run 'find . -type f -name '*out*' -print0 | xargs -0 file'
I bet some of the files you are calling "plain text files" are not
"ASCII text files", which is what the above is looking for.  For
example, a file 'file' reports as "ISO-8859 English text" will
almost certainly meet *your* critera for "plain text", but doesn't
include "ASCII" anywhere in the output of 'file'.

--
[EMAIL PROTECTED]          OpenPGP KeyID 0x57C3430B
Holder of Past Knowledge           CS, O-
"Working on Megatokyo is a lot like trying to fix the engine on a bus
while
it cruises down a bumpy highway at 75 mph with two monkeys fighting over
the steering wheel and a brick on the accelerator."  Piro

_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

_______________________________________________
gnhlug-discuss mailing list
gnhlug-discuss@mail.gnhlug.org
http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/

Reply via email to