From 29545819e1d9e6ddddc71769fa5f5537d1828e81 Mon Sep 17 00:00:00 2001 From: Michael <30936296+mtan93@users.noreply.github.com> Date: Fri, 24 Sep 2021 12:56:00 +0100 Subject: [PATCH] Create fix-spot-index.sh --- fix-spot-index.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 fix-spot-index.sh diff --git a/fix-spot-index.sh b/fix-spot-index.sh new file mode 100644 index 0000000..a4db56b --- /dev/null +++ b/fix-spot-index.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# This script is designed to fix Spotlight indexing issues +# by removing the existing Spotlight index and forcing Spotlight +# to create a new search index. + +echo Turning Spotlight indexing off + +/usr/bin/mdutil -i off / + +echo Deleting the Spotlight folder on the root level of the boot volume + +/bin/rm -rf /.Spotlight* + +echo Turning Spotlight indexing on + +/usr/bin/mdutil -i on / + +echo Forcing Spotlight re-indexing on the boot volume + +/usr/bin/mdutil -E /