Tutorial by Examples

$ tail -f /var/log/syslog > log.txt [1]+ Stopped tail -f /var/log/syslog > log.txt $ sleep 10 & $ jobs [1]+ Stopped tail -f /var/log/syslog > log.txt [2]- Running sleep 10 &
Creating jobs To create an job, just append a single & after the command: $ sleep 10 & [1] 20024 You can also make a running process a job by pressing Ctrl + z: $ sleep 10 ^Z [1]+ Stopped sleep 10 Background and foreground a process To bring the Process to the f...
There are two common ways to list all processes on a system. Both list all processes running by all users, though they differ in the format they output (the reason for the differences are historical). ps -ef # lists all processes ps aux # lists all processes in alternative format (BSD) Thi...
To check which process running on port 8080 lsof -i :8080
ps aux | grep <search-term> shows processes matching search-term Example: root@server7:~# ps aux | grep nginx root 315 0.0 0.3 144392 1020 ? Ss May28 0:00 nginx: master process /usr/sbin/nginx www-data 5647 0.0 1.1 145124 3048 ? S Jul18 2:53 nginx: worke...
$ gzip extremelylargefile.txt & $ bg $ disown %1 This allows a long running process to continue once your shell (terminal, ssh, etc) is closed.

Page 1 of 1