Tag Info

Hot answers tagged

3

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 ...


2

Find is used for filenames. Grep is used to search within a file or files. So for this, we'll use grep. From the root directory you wish to search in, run: grep -r 'shareEventHandler.php\|repToolBroker.php\|loginProctor.php\|messageBroker.php\|emailBroker.php' . grep - search app -r recursive search from this directory down Use "\|" between search terms ...


1

I'd suggest instructing find to look for all the files and print out the containing directory of each match, so you won't need to worry about parsing weird strings. Then use uniq to count the duplicates and awk to filter on the first field printing out those occurring more than once. e.g. find . -type f -iname '*.mkv' -printf '%h\n'|sort|uniq -c | awk '$1 ...



Only top voted, non community-wiki answers of a minimum length are eligible