Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Mac OS X: Make Spotlight search do-files


From   Steven Samuels <[email protected]>
To   [email protected]
Subject   st: Mac OS X: Make Spotlight search do-files
Date   Mon, 24 Nov 2008 15:39:05 -0500

-


My do files are text files, with extension “.do”. I usually search for text snippests from within my text editor, so I only recently realized that the do-files were not being searched by Spotlight, the OS X search application. Nor were do-files created by Stata's do- file editor searched. Phil Schumm wrote about this a few years ago (http://www.stata.com/statalist/archive/2005-11/msg01047.html), but didn't have a solution at that time.

Here are the steps I took to make all do-files searchable. These steps work at least in OS X 10.4.11. Can someone test them in 10.5?

1. Identify the do-files to Spotlight , as detailed in the following post:

http://www.mail-archive.com/[email protected]/msg01683.html

You will need to modify a system file, so be sure to first make a copy of it.

Notes:
1.1 The Spotlight Folder referred to in the post is inside the Library Folder of the root folder named "System", visible if you double click on the your main hard drive. (There is another Spotlight Folder inside the root Library Folder; ignore it.)

1.2. In OS X 10.4.11, the Spotlight file type for the do files is “com.stata.stata”.

2. Force Spotlight to re-index your hard drive, as follows: (Quoted from: http://www.dslreports.com/faq/13123)

"Have Spotlight reindex the entire computer. Do it at night before you go to bed -- it'll be done when you wake up. Here's the command line way to do it:

Step 1: Open Terminal.app

Step 2: Type in: sudo mdutil -E /

Step 3: You'll be prompted for the admin password. Enter it. "



-Steve










My do files are text files, with extension “.do”. I usually search for text snippests from within my text editor, so I only recently realized that the do-files were not being searched by Spotlight, the OS X search application. No do-files, including those created with Stata's do-file editor, were not being searched. Phil Schum wrote about this a few years ago (http://www.stata.com/statalist/archive/ 2005-11/msg01047.html)

Here are the steps I took to make the do-files searchable. This works at least in OS X 10.4.11.

1. Identify the do-files to Spotlight , as detailed in the following:
http://www.mail-archive.com/[email protected]/msg01683.html

This step requires familiarity with Terminal and the willingness to open a System file.

Notes:
a. Note that the Spotlight Folder referred to is inside the Library Folder of the root System Folder, *not* the root Library. b. In OS X 10.4.11, the Spotlight file type for the do files is “com.stata.stata”

2. Force Spotlight to re-index your hard drive: (Quoted from: http:// www.dslreports.com/faq/13123)

Sometimes Spotlight's index gets corrupted. When this happens, it won't find certain files or folders. You'll often discover this when you *know* a file exists somewhere but a Spotlight search doesn't uncover it. Here's what I recommend: Have Spotlight reindex the entire computer. Do it at night before you go to bed -- it'll be done when you wake up. Here's the command line way to do it:

Step 1: Open Terminal.app

Step 2: Type in: sudo mdutil -E /

Step 3: You'll be prompted for the admin password. Enter it.


-Steve











*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index