
Warning: unless you really can't avoid it, don't search from '/' (the root directory) to avoid a long and inefficient search! Note: You can add 2>/dev/null to these commands as well, to hide many error messages. The Silver Searcher: ag 'text-to-find-here' / -l RipGrep - fastest search tool around: rg 'text-to-find-here' / -l Better try them, provided they're available on your platform, of course: Faster and easier alternatives The find command is often combined with xargs, by the way.įaster and easier tools exist for the same purpose - see below. \ 2>/dev/nullįind is the standard tool for searching files - combined with grep when looking for specific text - on Unix-like platforms.
This will only search through those files which have. -e is the pattern used during the searchĪlong with these, -exclude, -include, -exclude-dir flags could be used for efficient searching:. -l (lower-case L) can be added to just give the file name of matching files. Go to Folder (⇧⌘G): Type the folder’s pathname (for example, /Library/Fonts/ or ~/Pictures/), then click Go.Do the following: grep -rnw '/path/to/somewhere/' -e 'pattern' From the Finder, choose “Go > Go to Folder.” You can also go to a folder by entering its pathname.
Utilities (⇧⌘U): Click on and open any tool in your Utilities folder. Applications (⇧⌘A): Click on and open any app in your Applications folder. iCloud Drive (⇧⌘I): Choose folders stored on your iCloud Drive. AirDrop (⇧⌘R): This option opens an AirDrop window, so you can wirelessly send documents, photos, videos, websites, map locations, and more to a nearby Mac, iPhone, iPad, or iPod touch. The latter is also available from the Networks option under the Go menu. Computer (⇧⌘C): Choose folders from your Mac’s drive, attached drives, or from a network to which you’re connected. Home (⇧⌘H): Choose folders from your Home folder (which includes folders for Applications, Pictures, Music, Movies, and more). Downloads (⌥⌘L): Choose folders from your Downloads file. Desktop (⇧⌘D): Choose folders on your, well, Desktop. (The submenu shows up to 10 recently opened folders.)
Recent Folders (⇧⌘F): Choose a folder from the submenu.Enclosing Folder (⌘↑): Choose this option to open the parent folder for the current window.