Monday, 29 August 2022

Killing a process (extracting PID with grep)

I can never remember the finer details of grep. Here I kill a particular python application by using a sequence of piped greps. The last grep to the right as the '-o' option to extract the PID of our particular Python application we wish to terminate. kill -9 $(ps -ax | grep python | grep replay.py | grep -o '^[0-9]*')

Saturday, 13 August 2022

Remote Copy with Wildcard

scp pi@192.168.1.43:/mnt/usb1/recordings/frontroom_2022_08_13_\* .