SUMMARY: how to find DOS formated files in solaris

From: Dan O'Callaghan <ocalld_at_eads.com>
Date: Thu Jun 30 2005 - 10:22:43 EDT
Hi 
Thanks to Carsten Knudsen, markus Mayer and Brad Morrison.

They came up with:
# find . -type f -print | xargs grep -l '^M$' | xargs file | egrep 'text|script'

The important thing to note, you cannot simply type shift+6 and shift+m to get the ^M character, that produces 2 separate characters. To produce the ^M, use Control+v followed by Control+m; grep will then find this character.

Markus also pointed out that gnu's version of file, will list DOS types. I couldn't find a binary for this and make failed when i tried to compile it on my solaris 10 workstation.

Thanks all for the help.

Dan.



On Wed, 2005-06-29 at 16:31, Dan O'Callaghan wrote:
> Hi
> 
> I have a solaris 8 system that people have over a long period of time, ftp
> files from windows.
> 
> I'm now finding that many of these files are still in DOS format i.e. ^M at
> the end of each line.
> 
> How can i do a search to find all the DOS formated files???
> 
> Thanks.
> 
> Dan.
> 
> 
> 
> 
> 
> 
> The information contained within this e-mail and any files attached to this
> e-mail is confidential and in addition may include commercially sensitive
> information. The contents of this e-mail are for the intended recipient only
> and therefore if you wish to disclose the information contained within this
> e-mail or attached files, please contact the sender prior to any such
> disclosure.
> If you are not the intended recipient, any disclosure, copying or distribution
> is prohibited. Please also contact the sender and inform them of the error and
> delete the e-mail, including any attached files from your system.
> _______________________________________________
> sunmanagers mailing list
> sunmanagers@sunmanagers.org
> http://www.sunmanagers.org/mailman/listinfo/sunmanagers
-- 
Dan O'Callaghan
Snr. Integration Engineer
EADS DS
Tel: +44 1633 292001
Fax: +44 1633 292215
e-mail: ocalld@eads.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Thu Jun 30 10:45:48 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:49 EST