git - Why can I view some Unix executable files in Mac OS X and not others? -
i on macbook pro on mac os x 10.10 (yosemite). when go /usr/bin
, git
there unix executable file. when open in sublime text, unreadable machine code. however, when open different unix executable file—in case, shell script had written, there others—i able open file in sublime text , view contents of script. have checked permissions both files, , same. why there different behavior when opening files?
executable files may scripts (in case can read text), or binaries (which elf formatted machine code). shell script script; git
elf binary.
you can use file
command see more detail. example, on nearest linux system:
$ file /usr/local/bin/git /usr/local/bin/git: elf 32-bit lsb executable, intel 80386, version 1 (sysv), dynamically linked (uses shared libs), gnu/linux 2.6.18, not stripped
Comments
Post a Comment