Could someone suggest the most efficient way to search within files for binary content? basically a handy way to test for corruption of non-binary files, as often null or other characters will be written - any unexpected character below ascii 32 is ideal to trigger it (so not \r \n \t). I tried something with no luck.
Probably not as efficient as having a dedicated boolean function to test for the presence of such things ("contenthasbinary:").
Many thanks!
David
Find files with binary content?
Re: Find files with binary content?
regex:binary:content:[\x00-\x08\x0b-\x0c\x0e-\x1f]
regex: = enable regular expressions.
binary: = treat the search as binary and the content as binary.
binary:
regex: = enable regular expressions.
binary: = treat the search as binary and the content as binary.
binary:
-
- Posts: 499
- Joined: Thu Dec 15, 2016 9:44 pm
Re: Find files with binary content?
Cheers, that's very helpful! Found a few with it adjusted
I'm away from my backups and there was a rapid sequence of power fluctuations, a reboot and another set that wrecked the OS and impacted my documents partitions.
When I get back I'll MD5 all the files on these drives and the backups and spot any Modified-Size combinations that have multiple MD5s, which indicates a corruption (content changes but Modified-Size attribute stays the same), so I can pick off the uncorrupted ones to rewrite over the corrupted ones.
d
I'm away from my backups and there was a rapid sequence of power fluctuations, a reboot and another set that wrecked the OS and impacted my documents partitions.
When I get back I'll MD5 all the files on these drives and the backups and spot any Modified-Size combinations that have multiple MD5s, which indicates a corruption (content changes but Modified-Size attribute stays the same), so I can pick off the uncorrupted ones to rewrite over the corrupted ones.
d