recentpopularlog in

mdfind

« earlier   
A (slightly) simpler command-line Spotlight search
Any qualified Spotlight query should be usable with "-interpret", so go ahead with
<code class="language-bash">mdfind -interpret "kind:image flash:1 modified:<=1/1/08 ex-girlfriend"</code>
to find those late-night pictures of last year's special someone.
macos  spotlight  metadata  mdfind  commandline  shellscripting  terminal  searchandindex  tipsandtricks  alternativeto  find 
september 2019 by kme
Spotlight Metadata Attributes
You can use these with 'mdfind', e.g., 'kMDItemKind == "Application"'.
mdfind  metadata  spotlight  macos  osx  devel  reference 
september 2019 by kme
Eight Terminal Utilities Every OS X Command Line User Should Know · mitchchn.me
"The OS X Terminal opens up a world of powerful UNIX utilities and scripts. If you’re migrating from Linux, you’ll find many familiar commands work the way you expect. But power users often aren’t aware that OS X comes with a number of its own text-based utilities not found on any other operating system. Learning about these Mac-only programs can make you more productive on the command line and help you bridge the gap between UNIX and your Mac."
mac  osx  terminal  pbcopy  mdfind  screencapture  launchctl  diskutil  homebrew 
september 2016 by moonhouse
Digging Deeper: Mastering Spotlight in OS X « Super User Blog
results in any other script. A very basic solution would be to export the result as a list of file paths:
mdfind kittens > list_of_kittens.txt
But you can also pipe the file names to xargs and let the Unix magic happen. Note that mdfind also has the -0 argument for passing file names with spaces, so that you can run something really basic like:
mdfind something -0 | xargs -0 basename
Or copy the files somewhere
mdfind something -0 | xargs -0 -I {} cp {} /some/folder
I’m sure that there are plenty of more useful things to do with these options. Now let’s look into how we can refine those search results.
mdfind  advancedsearch  finder  mac  spotlight  commandline 
september 2016 by paulbradshaw
Find if an application is from the Mac App Store - Mac OS X Hints
(About the command-line jobbie for Spotlight, mdfind:)
"I was rooting around my system today, and wondering if there's any way to find out if an application is from the Mac App Store. The Info window - when you select an item and press Command-I - doesn't say anything, but the System Information application does. There is an "App Store" column which says yes or no for each application.

"I figured there had to be another way, and eventually found that the mdls command gives some of this information. Running mdls <app name> returns a lot of information, but near the top of the list are a few lines like this"
spotlight  mdfind  2012  mac  osx 
august 2016 by handcoding
Mike Judge on Twitter: "Programmers on osx, here's some shell commands you may not know about: pbcopy (copy), pbpaste (paste), and mdfind (spotlight find)"
Programmers on osx, here's some shell commands you may not know about: pbcopy (copy), pbpaste (paste), and mdfind (spotlight find)
pbcopy  pbbaste  mdfind  macosx 
april 2016 by MemoryStomp
youpy/ruby-spotlight · GitHub
We recommend upgrading to the latest Safari, Google Chrome, or Firefox.
cli  mdfind  ruby  spotlight  mac  searching  tools 
june 2015 by evilkarlothian
youpy/ruby-spotlight
I found it while looking for a way to automate the creation of OS X Saved Searches. I haven't tested it far enough to be sure it's a perfect solution, but it's a great idea.
ruby  spotlight  mdfind  cli 
june 2015 by ttscoff
Eight Terminal Utilities Every OS X Command Line User Should Know · mitchchn.me
The OS X Terminal opens up a world of powerful UNIX utilities and scripts. If you’re migrating from Linux, you’ll find many familiar commands work the way you expect. But power users often aren’t aware that OS X comes with a number of its own text-based utilities not found on any other operating system. Learning about these Mac-only programs can make you more productive on the command line and help you bridge the gap between UNIX and your Mac.
osx  mac  terminal  commands  howto  open  pbcopy  pbpaste  mdfind  spotlight  commandline  screencapture  screenshot  launchctl  say  diskutil  brew  homebrew  utilities 
may 2014 by anso

Copy this bookmark:





to read