We normally have a file's canonical/absolute path, and with that we can get just about any details from it, usually through stat(2)-family. What about when we have the inode number? I had to come up with this little ugly function to parse (luckily I also had the PID) procfs and go comparing all the files... we can do better!
I'm hoping someone can tell me a more straightforward way of doing this - specially considering that something very similar will be in upcoming linux distros.
http://pastebin.com/5TxB4TMa
SOCIAL SHARE CARD GENERATOR