1. Apr 2022 |

ps aux with grep

Very good ps aux overview can be found on Linode website.

grep stands for global regular expression print

grep by default is case sensitive. Add -i to make it case insensitive.

ps aux | grep -i "robert" | grep -i "vscode" – by such piping you can narrow down the search step by step.

If kill does not then add kill -9 <pid> (source).

history | grep “git commit” | grep “something”

Regular expressions in grep and on youtube basic Grep and Regex and the most useful DO guide

ps aux | grep -i "...be.t"  – simple pattern match.

ps aux | grep -P -i "^weekend"  – add -P to get perl compatible regular expressions to work

ps aux | grep -i '^weekend.*product' – lines that start with weekend and contains word product.

To see your proccesses then ps ux is enough.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.