Well in rpm base distribution you may use this
rpm -qa /path/to/file
And you will have a answer like this :
rpm -qf /usr/bin/top
procps-3.2.7-11.1.el5
On a ubuntu server you should run
dpkg -S /path/to/file
dpkg -S /usr/bin/top
procps: /usr/bin/top