• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 444
  • Last Modified:

Search for specific file or text on an external mapped drive

I am looking for a script or command to search for specific text which is either in a file name or within documents, however it's on a mapped external drive on a MAC.
0
100questions
Asked:
100questions
  • 4
  • 3
4 Solutions
 
Britt ThompsonSr. Systems EngineerCommented:
You need to add the mounted drive to the search results list in your spotlight preferences so it will index the share. Then, you can search using Spotlight.

If you require a script you can just use grep -lir "search string" /path to search for files with the search string.
0
 
100questionsAuthor Commented:
How do I find out what the path is of the mapped external drive?
0
 
Britt ThompsonSr. Systems EngineerCommented:
you can open the terminal and type ls /volumes and see a list of all the drives. Or, you can drag the volume into the terminal window for a correctly formatted path (you can also drag specific folders from the volume to search into the terminal window for the full correctly formatted path).
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
100questionsAuthor Commented:
This is an external drive connected wirelessly, and it's showing up under the SHARED heading in finder.

When I try to drag it to the Terminal Window nothing happens, and when I type ls/ volumes, that drive is not listed.
0
 
Britt ThompsonSr. Systems EngineerCommented:
Ah, i forget you always have to show the drive on the desktop. If your finder preferences and check to show connected servers you will have a drive that shows up on the desktop.

screen cap
Then, you must actually go the item that shows under the shared list and actually open the share before the disk will mount on the desktop. IE, go in there and look at the list of files.

Then, you can drag the disk from the desktop into the terminal window. As it stands now, you're not actually connected to the share on the device.
0
 
100questionsAuthor Commented:
Thanks. I tried this, however how do I know it's searching?  Does it take a while?
0
 
Britt ThompsonSr. Systems EngineerCommented:
Yes, it will take some time and start listing files it finds. How long it takes depends on the speed of the connection and the number of files.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now