[root@myvm1 ~]# ps aux | grep ls root 13594 0.0 0.1 3912 672 pts/1 R+ 09:46 0:00 grep ls
In the above, the
ps aux runs first and its output is then redirected to the
grep ls command. The
grep ls command runs after
So why can
ps know about the process that runs after it and has it in its output?