1

I have an external hard disk. I have to search for a folder called Visa in that external Hard disk named ASTUTE. There might be multiple VISA folder but I want to search for all of them.

I navigated to external Hard Disk using cd and then typed find / -name VISA but I got lot of permission denied errors. Do I need to run it as super user? Is this right command?

0

2 Answers 2

5

When you run find / -name VISA, the / always refer to the root directory of your Mac and not the external drive because it's an absolute path. It's the same on any UNIX-Based system.

What you want, is to specify the folder where OSX has mounted your drive:

find /Volumes/ASTUTE -name VISA

And since you only want to search for folder you can use the -type params (d is for directory):

find /Volumes/ASTUTE -type d -name VISA

/Volumes is the default folder where OSX mount UBS drives.

Like Pan Long said, you can do the same by navigating to the drive itself:

cd /Volumes/ASTUTE
find . -name VISA

Here . refer to the relative path, wich is /Volumes/ASTUTE

1

Since you have navigated to the destination folder, you only need to search in current directory. Change the command to find . -name VISA

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .