[mythtv-users] Upgrade?

Darac Marjal mailinglist at darac.org.uk
Tue Dec 12 23:12:09 UTC 2017


On 12/12/17 18:07, Ian Campbell wrote:
> On Tue, 2017-12-12 at 12:18 -0500, Andrew Codrington wrote:
>> As this is a teachable moment, can anyone share a command line to
>> search the filesystem (or a recursive folder search) for files
>> containing a specific text string like "table_cache"?
> To search for a string in files you want grep(1), for a recursive
> search you want the "-r" flag, so e.g.
>
> 	grep -r table_cache /etc
>
> Would search all of /etc for "table_cache".
>
> Some distros have rgrep as an alias for "grep -r", in which case:
>
> 	rgrep table_cache /etc
>
> works too.

If you're really struggling to find information, and you're resorting to
searching large swathes of files, then ag (the silver searcher) is
brilliant. It works similarly to grep ("ag table-cache /etc"), but it
runs a lot faster than grep because of a few tricks (certain hidden
folders such as .svn, .git etc are skipped, it uses threads and
memory-mapping to read files just about as fast as they can come off the
disk and it's code is regularly profiled to achieve the best speed).

You can get ag directly from Github
<https://github.com/ggreer/the_silver_searcher>, or you can look there
for instructions on how to install it on your favourite OS (Linux,
MacOS, Windows ...)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20171212/856ecb70/attachment.sig>


More information about the mythtv-users mailing list