GREPing for Nulls

I just had a filesystem / file corruption issue on my HSP's server due to disk capacity limits and fileswapping. I discovered that certain files got corrupted when fileswapping was not successful and they ended up with a string of control characters, or what I believe to be nulls, in them.

Does anyone know the proper grep arguments for a complete directory file search to find all files containing "^@^@^@^@^@" where "^@" is what I believe to be nulls.

Thanks.

It probably would be a good idea for you to view one of these corrupt files in a code editor like Edit Plus where you can turn on viewing of spaces, nuls, and other special characters. Doing so would allow you to see what you are actually working with.

I use Dreamweaver...you wouldn't happen to know if that tool would work or if there are any raw tools on my Unix box to do the same thing would you? I think venturing off and installing new software makes me lean towards letting the corrupted files surface as I encounter them. Just looking for a quick use of the grep command. Thanks for your suggestion :slight_smile:

Use od -

cat badfile | od -c

You can use
man od
to find other options.

Thanks Jim...I'll give it a try.