Grep to find ^M (Windows carriage return)
There are two options here, one we used before when searching for the ^M’s in VI, the other is new: ^M $’\r’ So to find all files with the Windows carriage return in them, use one of the following… grep -r "^M" * grep -r $’\r’ * ^M is entered by pressing Ctrl+V followed by [...]