We have a FAQ article that links various scripts and programs on this site. One script:
display file mode turns symbolic permissions from
ls back to octal
This is one of the few scripts that was a collective effort of several users of this site. The thread is interesting to read and see how it evolved.