How To Search For Text In A File On Mac

It will help you recover deleted TextEdit text files on Mac with ease. Open the window that contained the item you want to retrieve; Connect Time Machine drive > Click Time Machine menu; Select Enter Time Machine > Find your backup; Preview the file > Restore the file. To quickly find any text string within any text file, try this from a terminal window: grep -l [text to find] [files to look in] For example, grep -l 123abc *.html will list the name of any file in the current directory that ends in.html and contains the string 123abc.

Search with Spotlight

  1. Click in the upper-right corner of the menu bar, or press Command-Space bar.
  2. Enter what you want to find. You can search for something like “apple store” or “emails from emily”.
  3. To open an item from the results list, double-click the item. Or to quickly look through the results, use the Up Arrow and Down Arrow keys.

Search by file type or location

  • To search by file type, use the word “kind” and the file type. For example, type “kind:folders” or “kind:audio”.
  • To show the location of a file on your Mac, choose the file from the results list, then press and hold Command. The file’s location appears at the bottom of the preview. To open the file’s location, press Command-R.
  • To see all the results from your Mac in the Finder, scroll to the bottom of the results list, then double-click “Show all in Finder.”

Get definitions, calculations, and conversions

Spotlight can show you dictionary definitions, calculations, measurement conversions, and more. Find out more ways to search with Spotlight.

File

Here are examples of what you can do:

  • To get a definition, enter a word or phrase, then click the result in the Definition section.
  • To get a calculation, enter something like “2+2” in the search field.
  • To convert measurements, enter something like 25 lbs or “32 ft to meters”.

Find movie showtimes, weather, and nearby places

See All Files On Mac

You can use Spotlight to search for movie showtimes, weather, and places near you.

Here are examples of what you can do:

  • To get showtimes, enter the name of the movie that you want to see. To see what's playing near you, enter “showtimes.”
  • To get local weather information, enter “weather.”
  • To find restaurants near you, enter something like “places to eat,” then click a result in the Maps section.

Learn more

  • Rebuild the Spotlight index on your Mac.
  • Use Search on your iPhone, iPad, or iPod touch.

Spotlight features might vary by country or region.

Summary

You may delete the text files from your Mac accidentally because of misoperations. Similarly, you may close your TextEdit document on your Mac without saving due to unexpected errors. Luckily, you can learn how to recover deleted TextEdit documents with EaseUS data recovery software/Time Machine or recover your unsaved TextEdit file with the built-in features on Mac from the methods provided below.

Another topic you may be interested in: How to recover deleted text messages on Mac

TextEdit is the default text editor on macOS. And similar to other files such as Word documents, Excel files, PPT files, and text messages, TextEdit files are likely to get lost due to accidental deletion or be closed without saving because of a software crash, a forced quit or some other reasons. If you stuck yourself into such a situation, you will need to find a TextEdit recovery solution to recover deleted or unsaved TextEdit files on Mac. Here we provide you two workable ways to retrieve deleted TextEdit files and the most potential way to recover unsaved text files on your Mac in detail.

PAGE CONTENT:
Part 1. Recover Deleted TextEdit Files on Mac
Part 2. Retrieve Unsaved TextEdit Files on Mac

Part 1. How to Recover Deleted TextEdit Files on Mac

Honestly speaking, it's relatively easy to recover deleted text files compared to restoring unsaved files on your Mac. Why? Because Mac file recovery tools will help you get back your lost data effectively but can't help to restore unsaved files because the data has never been stored on your hard drive before. Or if you have enabled Time Machine and backed up your Mac regularly, you can also recover the deleted TextEdit files on your Mac from the backup files. Here are two TextEdit recovery methods you can apply to recover deleted TextEdit files on your Mac. Choose the one works best for your case.

Method 1. Recover Deleted TextEdit Files on Mac with TextEdit Recovery Software

Tip
If you just deleted some content of the text files rather than removing the whole TextEdit file, you can undo deleted text on Mac by going to Edit > Undo from the Edit menu or pressing Command-Z on your keyboard.

How To Search For Text In Word

Between the two methods, the more straightforward way to get back deleted texts on Mac is using the best data recovery software - EaseUS Data Recovery Wizard for Mac, the professional and popular tool that has helped numerous users rescue their data in various complex data loss situations. Unlike Time Machine, this software is able to retrieve your deleted text files on your Mac without backup. With it, you can recover your deleted TextEdit files from your Mac with simple steps. To perform TextEdit recovery on Mac:

Step 1. Select the location where your important data & files were deleted and click the 'Scan' button.

Step 2. The software will run both quick scan and deep scan and work hard to find as many deleted files as possible on the selected volume.

Step 3. The scan results will be displayed in the left pane. Just select the file(s) and click the 'Recover Now' button to get them back.

In addition to recovering deleted TextEdit files, it also allows you to get back deleted/formatted files, including photos, videos, audio files, Office files, emails, and more, from a Mac, external hard drive, SD card, USB flash drive, and other Mac-compatible storage devices. Whether you want to recover deleted PPT files or recover files from a formatted USB flash drive, you can use this software to get things done.

Besides, even if you have Time Machine backup available but it fails to work, recovering deleted TextEdit files on Mac with third-party TextEdit recovery software like EaseUS Data Recovery Wizard is your best alternative choice. Don't hesitate to give it a try.

Method 2. Recover deleted TextEdit files on Mac from Time Machine

Time Machine backup is another solution for Mac TextEdit recovery when a data loss disaster happens unexpectedly on condition that you have turned on Time Machine and the lost files have been backed up. Here we present you how to recover files on your Mac with the Time Machine backup disk. If your backup disk is not currently available, learn how to recover files on Mac without Time Machine here.

Step 1. Connect your backup disk to your Mac and turn on your computer.

Step 2. If your Mac starts up to the setup assistant, set the details of your country, keyboard, and network. Then choose to transfer your information from a Time Machine backup from the Migration Assistant window. If your Mac starts up to the Finder, go to 'Applications' > 'Utilities' > 'Migration Assistant' and choose to transfer your information from a Time Machine backup.

Step 3. Select the wanted Time Machine backup and click 'Continue'.

Step 4. If you have more than one backup option to choose, select one of them and click 'Continue'.

Step 5. Choose the files to transfer and click 'Continue'.

Step 6. When the transfer has completed, restart your computer and log in to the target account, then you will see all the recovered files.

As you can see from the steps above, it's more time-saving to get back your lost file with Method 1.

Part 2. How to Recover Unsaved TextEdit Files on Mac

Except for accidental deletion, other common cases that require a TextEdit recovery is when TextEdit crashes, freezes or force quits unexpectedly before you save the file. When it happens, you will need to recover unsaved TextEdit files. Fortunately, by default, TextEdit saves copies of your documents to autosave files. It gives you a chance to recover unsaved TextEdit files on Mac. To restore unsaved TextEdit files on your Mac:

Step 1. Open TextEdit again.

Step 2. The recovered unsaved text files will be shown in the window. Find and save the files you need.

How

If the autosave files don't appear, you can try other possible ways to restore your TextEdit files from the article about how to recover unsaved Word documents on Mac.