---
title: "locate"
author: "mactonish"
date: "2011-11-08T09:47:15Z"
tags: ["Apple", "Mac", "locate"]
categories: ["操作系统"]
slug: "locate"
draft: false
lastmod: "2011-11-08T09:47:15Z"
id: 1241747
url: "https://mactonish.iteye.com/blog/1241747"
---

mac下locate 文件名
会报错


sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist


```linux
apple:~ apple$ locate errno.h

WARNING: The locate database (/var/db/locate.database) does not exist.
To create the database, run the following command:

  sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist

Please be aware that the database can take some time to generate; once
the database has been created, this message will no longer appear.

apple:~ apple$ 
```