Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to change the icon of a program called Refit with a custom one. This program has various tools and when I try to change those icons all is ok but then I run the following command:

$ locate refit.icns

and the output is:

$ /efi/refind/icons/os_refit.icns

The problem is that I don't have any folder called refind and the path simply doesn't exist. I tried it with both:

$ ls 


$ sudo ls

in the /efi directory. So my questions are actually two: how can I change the icon of that program? And why there is this strange behavior with the locate command?

I'm on Snow Leopard 10.6.8. Thanks for your help.

share|improve this question
up vote 1 down vote accepted

The locate command works off of a database, so if you used to have a file called /efi/refind/icons/os_refit.icns, locate might continue to report that file as an option even after the file has been deleted. The updatedb utility updates the locate database. This program should be run periodically. Typing sudo updatedb should run it immediately -- but be aware that this will take a while (probably a couple of minutes) to run, and it's rather disk-intensive.

A caveat: My Mac is powered into Linux at the moment, so I'm basing this on Linux utilities. OS X is usually quite similar at this level, but it's possible there are some critical differences.

share|improve this answer
your answer is correct but you should update it for the mac case. The command is sudo /usr/libexec/locate.updatedb according to this answer on SuperUser. Thanks!!! – Luigi Tiburzi Nov 22 '12 at 8:53

Locate can be configured to look for mounted and unmounted partitions. I'll admit that I have no experience with locate in OS X (run locate -V to get some info), but I'll guess that you will find that some sort of boot partition is being scanned and indexed by locate if you look at the configuration file. It may be located in /etc/locate.conf. If it's not there, then do a man locate and scroll down to FILES. If you find only the mount-point there (ie /efi), then /etc/fstab is the place to look for the associated device.

share|improve this answer
I don't understand, if I have deleted the refind folder, in which partition it exists? When I run $locate 'a file I'm sure it's in my home' it finds it immediately so I guess it is scanning the right partition. – Luigi Tiburzi Nov 13 '12 at 8:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.