Originally Posted By: artie505
And, indeed, those three files, along with a bevy of others are corrupt, and this

ls -l /usr/bin -->
-r-xr-xr-x@ 1 root wheel 0 Jul 14 2009 du

looks to be my problem?

Absolutely.


Originally Posted By: artie505
(If you'd like to see the complete laundry list generated by

ls -l /usr/bin

just ask.)

Well, actually i'd like to see *just* the bad ones (since the full list has over 900 lines).

This should do it:

ls -l /usr/bin |awk '$5 == 0 {print}'

Thanks.

The biggest annoyance with these sorts of screw ups is: how do we *know* that the problem is confined to the /usr/bin folder? There could be weirdness like that all over the place.

A full reinstall is the only way i'd feel safe.
But then, why did yours end up like that?
And what stops it from happening again?


EDIT: here is a more generalized search. It looks inside the folders /bin /sbin and /usr for files that are less than one byte big:

find -f /bin /sbin /usr -type f -size -1c -exec ls -ldF@ {} +

-rw-r--r-- 1 root wheel 0 May 18 2009 /usr/share/groff/1.19.2/tmac/mm/locale
-rw-r--r-- 1 root wheel 0 May 18 2009 /usr/share/groff/1.19.2/tmac/mm/se_locale

Looks like i have some myself (but they seem to be... well, idunno. Hopefully those are supposed to be 0-byte files).


EDIT 2: this will skip that "groff" area (i suspect those items are supposed to be zero bytes):

find -f /bin /sbin /usr -type f -size -1c -not -path '*/groff/*' -exec ls -ldF@ {} +

Last edited by Hal Itosis; 05/29/10 04:43 PM. Reason: tweax