I noticed the issue when I first went to run
defaults write com.apple.finder AppleShowAllFiles YES
in OS X Terminal (10.11.2) but this was returned
bash: /usr/bin/defaults: Invalid argument
I'm not sure what is going on with defaults, but I also have a similar issue with brew:
/bin/bash: /usr/bin/dirname: Invalid argument
I clearly broke something (or perhaps malware), but not sure how I did it or when it happened. This is causing all sorts of issues. Any thoughts on fixing it?
My PATH variable looks like this:
EDIT: I noticed my issue is similar to this one: OS X Yosemite Hard Disk Errors even after Repairing them but there's no resolution.