Grep-like command on Home Assistant OS?

I recently switched from HA in python venv to using Home Assistant OS. I’m liking a lot of the simplicity.

However, one thing I miss from running on Ubuntu was the linux commands… for example, I could run grep when I needed to find what files (automations, scripts, etc) used a specific entity name.

Is there a way to do something similar on Home Assistant OS?

Setup Samba and edit your files on your desktop. Then use a proper code editor such as Visual Studio Code (which has a nice HA extension as well for auto complete for entities etc.) or whatever you prefer.

I setup Samba right away actually. It’s quite a nice method for accessing the files. But I was hoping Home Assistant OS had a grep function to actually search within the config files. Windows search functions just look at filenames and not what’s actually in the files. Now, I could write and run a batch or python script or something… But I’d rather not reinvent the wheel if there’s already some built in functionality to run the search.

It seems to me like hass-cli would be the obvious place to have a search function like that… But I didn’t see anything in the docs about it.

Then use Visual Studio Code as I suggested to edit the files through Samba. Also since a few releases, when you click on an entity in the frontend, it should show you in which automations/scripts it is used.