简体   繁体   English

Linux grep 或查找带有不可打印特殊字符的文件 - 记录分隔符

[英]Linux grep or find files with nonprintable special character - record separator

Some files have "file separator" and "record separator" characters in them.某些文件中包含“文件分隔符”和“记录分隔符”字符。 I'd like to list the files with them.我想和他们一起列出文件。 A record separator is character 28, 1E in hex, or just RS.记录分隔符是字符 28、十六进制的 1E 或只是 RS。 It's not like one of the printable characters that can be escaped.它不像可以转义的可打印字符之一。 It's also not like line feeds or tabs with \\n and \\t respectively.它也不像分别带有 \\n 和 \\t 的换行符或制表符。

How would I grep or find files with record separator characters?我将如何 grep 或查找带有记录分隔符的文件?

嗯,我想是我自己想出来的。

grep -Rl -E "[\x1E]" .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM