Help write a program that should search and count the number of processes by name (for example: "my-proc").
I understand:
Browse the directories in the "/ proc /" directory.
In each of them, read the file "comm" and compare it with the name of the process we are looking for.
ps How to implement in C?
opendir(); while(readdir()) { open(); read(); if(memcmp()) n++; close(); } printf n;- Mike