Obtaining Input from Commands
Let’s start with something simple, by obtaining some basic process information. On the Fedora Server virtual machine that’s running Apache, search for all ps aux
output lines that contain the httpd
pattern, like so:
donnie@fedora:~$ ps aux | awk '/httpd/ {print $0}'
root 1072 0.0 0.2 19108 10796 ? Ss 14:36 0:01 /usr/sbin/httpd -DFOREGROUND
apache 1111 0.0 0.1 19204 6788 ? S 14:36 0:00 /usr/sbin/httpd -DFOREGROUND
apache 1112 0.0 0.2 2158280 8448 ? Sl 14:36 0:02 /usr/sbin/httpd -DFOREGROUND
apache 1113 0.0 0.2 2420488 8592 ? Sl 14:36 0:03 /usr/sbin/httpd -DFOREGROUND
apache 1114 0.0 0.2 2158280 8448 ? Sl 14:36 0:02 /usr/sbin/httpd -DFOREGROUND
donnie 1908 0.0 0.0 9196 3768 pts/0 S+ 17:13 0:00 awk /httpd/ {print $0}
donnie@fedora:~$
Next, let’s say that we want to see all processes that are owned by the...