'Bad data' when using find in terminal

When running find I get an error:

~/code> find . -iname “View.h” -and -not -path “/.hg/” -and -not -iname “*.d”
find: ‘./lgi/deps/libiconv/source/ChangeLog’: Bad data
./lgi/trunk/include/lgi/common/AudioView.h
./lgi/trunk/include/lgi/common/DocView.h

What does the ‘Bad data’ mean, and how do I fix it?
This is in the context of a qemu VM running Haiku shredder 1 hrev59058 Oct 10 2025 06:02:11 x86_64 x86_64 Haiku

Perhaps the file system is not in a clean state (after a crash or otherwise less than clean reboot/shutdown)?

Try running checkfs /boot, and see if that helps.

1 Like

That seems to have fixed things up. I no longer get that error message. I did notice that the find command wasn’t returning results correctly for a little while afterwards, but then it did. Which was pretty weird. But oh well…

Besides checkfs clearing things up on disk, maybe the file caches got in a weird state? There have been some sporadic reports of such things, like getting corrupt file after/during long compilations (or taxing test-runs), that dissapear after a reboot.

Example: https://dev.haiku-os.org/ticket/16951. And I’ve seen similar on a couple of occasions.