Find what package a file belongs

Which rpm package does a file belong to?

run "rpm -qf file"

Here is an example on how to find out what rpm (redhat package) a file belongs to:

# rpm -qf /bin/ls
coreutils-8.4-37.0.2.el6.x86_64

# rpm -qf /etc/passwd
setup-2.8.14-20.el6_4.1.noarch