System Grab Bag

View all TLDR pages from common (or from all pages)

pt

Platinum Searcher. A code search tool similar to ag. More information: https://github.com/monochromegane/the_platinum_searcher.
  • Find files containing "foo" and print the files with highlighted matches:
    pt {{foo}}
  • Find files containing "foo" and display count of matches in each file:
    pt -c {{foo}}
  • Find files containing "foo" as a whole word and ignore its case:
    pt -wi {{foo}}
  • Find "foo" in files with a given extension using a regular expression:
    pt -G='{{\.bar$}}' {{foo}}
  • Find files whose contents match the regular expression, up to 2 directories deep:
    pt --depth={{2}} -e '{{^ba[rz]*$}}'

License and Disclaimer

The content on this page is copyright © 2014—present the tldr-pages team and contributors.
This page is used with permission under Creative Commons Attribution 4.0 International License.

While we do attempt to make sure content is accurate, there isn't a warranty of any kind.