Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Hi,i got a question.
I want to know if there is some command to use to detect dos file in Linux OS.
Some people told me with "grep -l '^M' filename ",but i try it and find it doesn't work.Maybe it works in Unix OS.
If you know how to do it ,please tell me ,thanks.
Thanks you druuna.
Thanks bartonski for your script about my question.
For a single file, I do know how to detect if it is a dos file or others,
but if there are many files need to detect, i just want to detect them with simple command.For this,is there much better method to resolve it?
Through File command,i can do it.But i think it is not the best one.
< find ./ -type f | xargs file | grep "CRLF" | awk -F: '{print $1}' >
If someone know the better method, please tell me.
Thanks.
In my pc,the man content of grep is old.(2000/06/09)
So i cann't find the option of "-P".
But grep version is like this : grep (GNU grep) 2.5.1 .
and it has had the function to deal with "-P",i didn't notice it.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.