Solved

Search for specific file or text on an external mapped drive

Posted on 2013-12-06
7
409 Views
Last Modified: 2013-12-08
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
Comment
Question by:100questions
  • 4
  • 3
7 Comments
 
LVL 30

Accepted Solution

by:
renazonse earned 500 total points
ID: 39702440
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
 

Author Comment

by:100questions
ID: 39702483
How do I find out what the path is of the mapped external drive?
0
 
LVL 30

Assisted Solution

by:renazonse
renazonse earned 500 total points
ID: 39702484
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

Author Comment

by:100questions
ID: 39702503
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
 
LVL 30

Assisted Solution

by:renazonse
renazonse earned 500 total points
ID: 39702511
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
 

Author Comment

by:100questions
ID: 39702567
Thanks. I tried this, however how do I know it's searching?  Does it take a while?
0
 
LVL 30

Assisted Solution

by:renazonse
renazonse earned 500 total points
ID: 39702571
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

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Apple's Mac OS X has become an official member of the malware club. The Flashback Trojan has affected over half million Macs, worldwide. It is behavior that ultimately gets malware onto a person’s computer. Obsolete or out-of-date software helps…
A common question or need, when setting-up a new Mac for someone would be to make all of the applications, installed, available from the dock. Many people often do not realize an application is installed unless it is in the dock. Creating a custo…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now