[{"data":1,"prerenderedAt":121},["ShallowReactive",2],{"blog-post-ripgrep-search-hidden-files":3,"recent-posts":76},{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":10,"slugs":11,"linked_documents":13,"lang":14,"alternate_languages":15,"data":16},"awbJaBIAACsAJT6H","ripgrep-search-hidden-files",null,"blog_posts","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axHxNRMAACoA2InR&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awbJaBIAACsAJT6H%22%29+%5D%5D",[],"2026-12-03T22:46:13+0000",[12],"ripgrep-how-to-search-hidden-files",[],"en-us",[],{"title":17,"date":23,"description":24,"image":29,"content":39},[18],{"type":19,"text":20,"spans":21,"direction":22},"heading1","Ripgrep: How to Search Hidden Files",[],"ltr","2026-12-03",[25],{"type":26,"text":27,"spans":28,"direction":22},"heading2","Learn how to search hidden files and dotfiles with ripgrep (rg)",[],{"dimensions":30,"alt":20,"copyright":6,"url":33,"id":34,"edit":35},{"width":31,"height":32},1280,720,"https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FURhJw7MpuRYF7gWJ_ripgrep-search-hidden-files.png?auto=format,compress","URhJw7MpuRYF7gWJ",{"x":36,"y":36,"zoom":37,"background":38},0,1,"transparent",[40,44,48,51,54,57,60,63,66,69,73],{"type":41,"text":42,"spans":43,"direction":22},"paragraph","Before we start, make sure you have ripgrep installed on your computer. On a Mac, you can install it with Homebrew:",[],{"type":45,"text":46,"spans":47,"direction":22},"preformatted","brew install ripgrep",[],{"type":41,"text":49,"spans":50,"direction":22},"By default, ripgrep skips hidden files and folders, which are anything that starts with a dot, like \u003Ccode>.vscode\u003C\u002Fcode> or \u003Ccode>.github\u003C\u002Fcode>. To include them, open your terminal, go to your project folder and run:",[],{"type":45,"text":52,"spans":53,"direction":22},"rg --hidden \"pattern\"",[],{"type":41,"text":55,"spans":56,"direction":22},"The \u003Ccode>--hidden\u003C\u002Fcode> flag (or its short form \u003Ccode>-.\u003C\u002Fcode>) tells ripgrep to search dotfiles too. Don't worry if you suddenly see lots of results from \u003Ccode>.git\u003C\u002Fcode>; those are just Git's internal files. Filter them out with a negative glob:",[],{"type":45,"text":58,"spans":59,"direction":22},"rg --hidden -g '!.git\u002F' \"pattern\"",[],{"type":41,"text":61,"spans":62,"direction":22},"Keep the single quotes around \u003Ccode>'!.git\u002F'\u003C\u002Fcode> so your shell doesn't treat the \u003Ccode>!\u003C\u002Fcode> as a history command.",[],{"type":41,"text":64,"spans":65,"direction":22},"One thing to watch out for: \u003Ccode>--hidden\u003C\u002Fcode> still respects your \u003Ccode>.gitignore\u003C\u002Fcode>, so an ignored file like \u003Ccode>.env\u003C\u002Fcode> won't show up. To search hidden and ignored files, use \u003Ccode>-uu\u003C\u002Fcode>:",[],{"type":45,"text":67,"spans":68,"direction":22},"rg -uu \"pattern\"",[],{"type":70,"oembed":71},"embed",{"embed_url":72,"type":70},"",{"type":41,"text":74,"spans":75,"direction":22},"If you always want hidden files, add \u003Ccode>--hidden\u003C\u002Fcode> and \u003Ccode>--glob=!.git\u002F\u003C\u002Fcode> to a ripgrep config file and point the \u003Ccode>RIPGREP_CONFIG_PATH\u003C\u002Fcode> environment variable at it.",[],{"results":77,"page":37,"results_per_page":119,"results_size":119,"total_results_size":120,"total_pages":37},[78,80,99],{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":10,"slugs":11,"linked_documents":13,"lang":14,"alternate_languages":15,"data":79},{"image":29,"title":17},{"id":81,"uid":82,"url":6,"type":7,"href":83,"tags":84,"first_publication_date":10,"last_publication_date":10,"slugs":85,"linked_documents":87,"lang":14,"alternate_languages":88,"data":89},"awbJhRIAACcAJT6_","ripgrep-show-line-numbers","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axHxNRMAACoA2InR&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awbJhRIAACcAJT6_%22%29+%5D%5D",[],[86],"ripgrep-how-to-show-line-numbers",[],[],{"image":90,"title":96},{"dimensions":91,"alt":92,"copyright":6,"url":93,"id":94,"edit":95},{"width":31,"height":32},"Ripgrep: How to Show Line Numbers","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002Fs321hxB6Ig55dpAV_ripgrep-show-line-numbers.png?auto=format,compress","s321hxB6Ig55dpAV",{"x":36,"y":36,"zoom":37,"background":38},[97],{"type":19,"text":92,"spans":98,"direction":22},[],{"id":100,"uid":101,"url":6,"type":7,"href":102,"tags":103,"first_publication_date":10,"last_publication_date":10,"slugs":104,"linked_documents":106,"lang":14,"alternate_languages":107,"data":108},"awbJoRIAACkAJT7y","ripgrep-fix-rg-command-not-found","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=axHxNRMAACoA2InR&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awbJoRIAACkAJT7y%22%29+%5D%5D",[],[105],"ripgrep-how-to-fix-rg-command-not-found",[],[],{"image":109,"title":115},{"dimensions":110,"alt":111,"copyright":6,"url":112,"id":113,"edit":114},{"width":31,"height":32},"Ripgrep: How to Fix rg Command Not Found","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002Fhg6FIxSh73y6T04k_ripgrep-fix-rg-command-not-found.png?auto=format,compress","hg6FIxSh73y6T04k",{"x":36,"y":36,"zoom":37,"background":38},[116],{"type":19,"text":117,"spans":118,"direction":22},"Ripgrep: How to Fix \"rg Command Not Found\"",[],3,127,1796337997308]