From 1dba7155192ceaa26fa0493fd6035e53b6161a13 Mon Sep 17 00:00:00 2001 From: Marcel Bischoff Date: Thu, 15 Oct 2015 00:13:15 +0200 Subject: [PATCH] Add LaunchServices, Search categories and entries --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 45d0e6c..d8929df 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,8 @@ If you want to contribute, you are highly encouraged to do so. Please read the [ - [Gatekeeper](#gatekeeper) - [Passwords](#passwords) - [Wiping Data](#wiping-data) +- [Search](#search) + - [Locate](#locate) - [System](#system) - [AppleScript](#applescript) - [Basics](#basics) @@ -55,6 +57,7 @@ If you want to contribute, you are highly encouraged to do so. Please read the [ - [Information/Reports](#information-reports) - [Kernel Extensions](#kernel-extensions) - [LaunchAgents](#launchagents) + - [LaunchServices](#launchservices) - [Memory Management](#memory-management) - [Notification Center](#notification-center) - [QuickLook](#quicklook) @@ -504,6 +507,22 @@ srm -rf /path/to/complete/destruction ``` +## Search + +### Locate + +#### Build Locate Database +```bash +sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.locate.plist +``` + +#### Search via Locate +The `-i` modifier makes the search case insensitive. +```bash +locate -i *.jpg +``` + + ## System ### AppleScript @@ -650,6 +669,13 @@ Run job every 5 minutes. ``` +### LaunchServices + +#### Rebuild LaunchServices Database +To be independent of OS version, this relies on `locate` to find `lsregister`. If you do not have your `locate` database built yet, [do it](#build-locate-database). +```bash +sudo $(locate lsregister) -kill -seed -r +``` ### Memory Management