Wait

From LQWiki
Jump to navigation Jump to search

wait is a command to wait for a process to change state.

Note
If you are looking for a command to wait a number of seconds, please see the correct command sleep.

Example

open a shell and enter:

$ ps
PID TTY          TIME CMD
3118 pts/16   00:00:00 bash
3241 pts/16   00:00:00 kwrite
3252 pts/16   00:00:00 ps
$ wait 3241; echo "You have quit kwrite."

wait man page

The man page for wait is here.