{"id":187,"date":"2005-09-05T20:42:38","date_gmt":"2005-09-06T03:42:38","guid":{"rendered":"http:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/"},"modified":"2005-09-05T20:42:38","modified_gmt":"2005-09-06T03:42:38","slug":"spotlight-replaces-locate","status":"publish","type":"post","link":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/","title":{"rendered":"spotlight replaces locate"},"content":{"rendered":"<p>years of unix I spent without knowing about the<br \/>\n<code><br \/>\nlocate<br \/>\n<\/code><br \/>\n&#8220;fool me once, shame on you&#8221; or however GWB would say that.<br \/>\nNow with spotlight in OS X 10.4 this became somewhat redundant.<br \/>\nIt was only today that I realized:<br \/>\n<code><br \/>\nmdfind<br \/>\n<\/code><br \/>\nis your command line friend. With a command like<br \/>\n<code><br \/>\nmdfind \"kMDItemFSName == a.out\"<br \/>\n<\/code><br \/>\nyou can easily replicate what<br \/>\n<code><br \/>\nlocate a.out<br \/>\n<\/code><br \/>\nwould have done. This works nicely around certain things I don&#8217;t like about the spotlight UI: sometimes I only want to see where a given file name might be hiding. Spotlight finds it, of course. However I did not find an easy and intuitve way to only find file names. The UI finds usually to much. And there seems not to be an easy way to get the directory in a copy paste buffer. Command line wins again.<br \/>\nYeah! for mdutil mdls mdfind and all the others!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>years of unix I spent without knowing about the locate &#8220;fool me once, shame on you&#8221; or however GWB would say that. Now with spotlight in OS X 10.4 this became somewhat redundant. It was only today that I realized: mdfind is your command line friend. With a command like mdfind &#8220;kMDItemFSName == a.out&#8221; you [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,12,19],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v23.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>spotlight replaces locate - Andreas Wacker<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"spotlight replaces locate - Andreas Wacker\" \/>\n<meta property=\"og:description\" content=\"years of unix I spent without knowing about the locate &#8220;fool me once, shame on you&#8221; or however GWB would say that. Now with spotlight in OS X 10.4 this became somewhat redundant. It was only today that I realized: mdfind is your command line friend. With a command like mdfind &quot;kMDItemFSName == a.out&quot; you [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/\" \/>\n<meta property=\"og:site_name\" content=\"Andreas Wacker\" \/>\n<meta property=\"article:published_time\" content=\"2005-09-06T03:42:38+00:00\" \/>\n<meta name=\"author\" content=\"1\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@_andreaswacker\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"1\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/\"},\"author\":{\"name\":\"1\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631\"},\"headline\":\"spotlight replaces locate\",\"datePublished\":\"2005-09-06T03:42:38+00:00\",\"dateModified\":\"2005-09-06T03:42:38+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/\"},\"wordCount\":143,\"publisher\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a\"},\"articleSection\":[\"Apple\",\"linux\",\"technology\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/\",\"url\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/\",\"name\":\"spotlight replaces locate - Andreas Wacker\",\"isPartOf\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#website\"},\"datePublished\":\"2005-09-06T03:42:38+00:00\",\"dateModified\":\"2005-09-06T03:42:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.andreaswacker.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"spotlight replaces locate\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#website\",\"url\":\"https:\/\/www.andreaswacker.com\/blog\/\",\"name\":\"Andreas Wacker\",\"description\":\"weblog\",\"publisher\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.andreaswacker.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a\",\"name\":\"Andreas Wacker\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png\",\"contentUrl\":\"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png\",\"width\":248,\"height\":248,\"caption\":\"Andreas Wacker\"},\"logo\":{\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/\"},\"sameAs\":[\"http:\/\/www.andreaswacker.com\",\"https:\/\/www.instagram.com\/_andreaswacker\/\",\"https:\/\/x.com\/_andreaswacker\",\"https:\/\/www.youtube.com\/channel\/UCWwFtVC_HATVr-R5EiNmhHw\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631\",\"name\":\"1\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g\",\"caption\":\"1\"},\"url\":\"https:\/\/www.andreaswacker.com\/blog\/author\/1\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"spotlight replaces locate - Andreas Wacker","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/","og_locale":"en_US","og_type":"article","og_title":"spotlight replaces locate - Andreas Wacker","og_description":"years of unix I spent without knowing about the locate &#8220;fool me once, shame on you&#8221; or however GWB would say that. Now with spotlight in OS X 10.4 this became somewhat redundant. It was only today that I realized: mdfind is your command line friend. With a command like mdfind \"kMDItemFSName == a.out\" you [&hellip;]","og_url":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/","og_site_name":"Andreas Wacker","article_published_time":"2005-09-06T03:42:38+00:00","author":"1","twitter_card":"summary_large_image","twitter_site":"@_andreaswacker","twitter_misc":{"Written by":"1","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/#article","isPartOf":{"@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/"},"author":{"name":"1","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631"},"headline":"spotlight replaces locate","datePublished":"2005-09-06T03:42:38+00:00","dateModified":"2005-09-06T03:42:38+00:00","mainEntityOfPage":{"@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/"},"wordCount":143,"publisher":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a"},"articleSection":["Apple","linux","technology"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/","url":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/","name":"spotlight replaces locate - Andreas Wacker","isPartOf":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#website"},"datePublished":"2005-09-06T03:42:38+00:00","dateModified":"2005-09-06T03:42:38+00:00","breadcrumb":{"@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.andreaswacker.com\/blog\/2005\/09\/05\/spotlight-replaces-locate\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.andreaswacker.com\/blog\/"},{"@type":"ListItem","position":2,"name":"spotlight replaces locate"}]},{"@type":"WebSite","@id":"https:\/\/www.andreaswacker.com\/blog\/#website","url":"https:\/\/www.andreaswacker.com\/blog\/","name":"Andreas Wacker","description":"weblog","publisher":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.andreaswacker.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/c1f46a348eafeb52ee54843dce18442a","name":"Andreas Wacker","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png","contentUrl":"https:\/\/www.andreaswacker.com\/blog\/wp-content\/uploads\/2024\/06\/awfavion.png","width":248,"height":248,"caption":"Andreas Wacker"},"logo":{"@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/"},"sameAs":["http:\/\/www.andreaswacker.com","https:\/\/www.instagram.com\/_andreaswacker\/","https:\/\/x.com\/_andreaswacker","https:\/\/www.youtube.com\/channel\/UCWwFtVC_HATVr-R5EiNmhHw"]},{"@type":"Person","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/691b5221b886b3b09742e476a16e5631","name":"1","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.andreaswacker.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","caption":"1"},"url":"https:\/\/www.andreaswacker.com\/blog\/author\/1\/"}]}},"_links":{"self":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/posts\/187"}],"collection":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/comments?post=187"}],"version-history":[{"count":0,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/posts\/187\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/media?parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/categories?post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.andreaswacker.com\/blog\/wp-json\/wp\/v2\/tags?post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}