Tuesday, March 15, 2022

[SOLVED] Search in files 0x1F (Unit Separator) using Linux utilities (e.g. grep)

Issue

Can't find Unit Separator in files.

Tried using the command:

grep -liE "\ x1F" ./xml/file_bad.xml

rel="nofollow noreferrer">XML file

Tell me how to find the names of all files in the folder that contain 0x1F (Unit Separator).


Solution

You could try grep -l "$(printf '\x1f')" *. If you're using bash, you could do grep -l $'\x1f' *.

Note, however, that the standard for grep specifies that the input is expected to be a text file. Although many implementations of grep work for non-text input, I suppose that behavior is implementation specific.



Answered By - William Pursell
Answer Checked By - Pedro (WPSolving Volunteer)