Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Search for specific file or text on an external mapped drive

Posted on 2013-12-06
7
Medium Priority
?
428 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 30

Accepted Solution

by:
Britt Thompson earned 2000 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:Britt Thompson
Britt Thompson earned 2000 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
10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

 

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:Britt Thompson
Britt Thompson earned 2000 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:Britt Thompson
Britt Thompson earned 2000 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We could spend the next millennium discussing the differences of the Mac and Windows platforms. The next century will continue to have fanatics on both side of the equation and neither side will win the war. However, that’s not why we are here. W…
Set up iPhone and iPad email signatures to always send in high-quality HTML with this step-by step guide.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 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