![](/static/66c60d9f/assets/icons/icon-96x96.png)
![](https://lemmy.world/pictrs/image/0943eca5-c4c2-4d65-acc2-7e220598f99e.png)
grep -r string .
The flag should go before the pattern.
-r
to search recursively, .
refers to the current directory.
Why use .
instead of *
? Because on it’s own, *
will (typically) not match hidden files. See the last paragraph of the ‘Origin’ section of: https://en.m.wikipedia.org/wiki/Glob_(programming). Technically your ls
command (lacking the -a
) flag would also skip hidden files, but since your comment mentions finding the string in ‘any files,’ I figured hidden files should also be covered (the find
commands listed would also find the hidden files).
EDIT: Should have mentioned that -R
is also recursive, but will follow symlinks, where -r
will ignore them.
Not sure if it’s what you’re looking for, but lirc has a database. Instructions for contributing files can be found here, files should adhere to the checklist here.