Well, I should have specified my "typographical conventions"
. Leaving out the excess stuff,
you typed: which dirname
and the system responded: /usr/bin/dirname
you typed: ls -l /usr/bin/dirname
and the system responded: -r-xr-xr-x@ 1 root wheel 0 18 Mai 2009 /usr/bin/dirname
The first part of the answer, -r-xr-xr-x@, are the file permissions. The @ sign means there are extended attributes, which is unusual for a system command. Also, it seems to have zero length (the 0 after wheel).
First, let's confirm that dirname doesn't work:dirname /Applications/Arduino.app
The system should respond with /Applications, but I expect it won't.ls -l@ /usr/bin/dirname
I don't know, however, what to expect.
Maybe the original file was replaced by a different one and the system is protecting you agains possible fakes. And maybe there are other system files in the same state. Maybe you should perform a full system check, or restore the OS straight away, but here I'm more a linux than a Mac person and don't know what would be best.