Question: Is there an equivalent to the yum "whatprovides" option in apt-get? 

For example on CentOS

```
yum whatprovides /usr/share/gdm/themes/TreeFlower/background.png

```

Tells me 

```
redhat-logos-4.9.99-11.el5.centos.noarch : CentOS-related icons and pictures.
Repo        : base
Matched from:
Filename    : /usr/share/gdm/themes/TreeFlower/background.png

```

Can I get similar functionality on the command line in Ubuntu?

Answer: 
You want the 'apt-file' command.

```
apt-file search /usr/share/gdm/themes/TreeFlower/background.png

```

Before using it, you may need to create or update its database by running:

```
apt-file update

```
Isn't this the same question as this [How do I find the package that provides a file?](https://askubuntu.com/questions/481/how-do-i-find-the-package-that-provides-a-file)

I prefer the `dpkg -S <filepath>` command