sleep:
This command is used in UNIX operating system to suspend execution of the system for the specified time limit mentioned in it as parameter.
The general format of sleep command is
sleep no_of_seconds
The sleep suspends the execution of the shell in UNIX operating system for the no_of seconds specified.
For instance
sleep 5
The above suspend the execution of the shell in UNIX operating system for 5 seconds specified.
wait:
wait causes waiting of the process specified in parameter or the job specified in parameter to wait. If nothing is specified all jobs in pipeline are put to waiting state that is all current child process which are currently active are put to wait status. Wait also return the return status. The return status is generally the exit status of last job in the pipeline process which was put to waiting state. In case of scenario in which no job or process is specified the return status would be zero.
The general syntax of wait command in UNIX operating system is
wait n
where n is optional which denote the process or job
killall:
The command killall is used to kill processes which are active. The main aspect in this is killall command can be issued only by the super user.
What is the difference between the commands sleep, wait and killall?
sleep:
This command is used in UNIX operating system to suspend execution of the system for the specified time limit mentioned in it as parameter.
The general format of sleep command is
The sleep suspends the execution of the shell in UNIX operating system for the no_of seconds specified.
For instance
The above suspend the execution of the shell in UNIX operating system for 5 seconds specified.
wait:
wait causes waiting of the process specified in parameter or the job specified in parameter to wait. If nothing is specified all jobs in pipeline are put to waiting state that is all current child process which are currently active are put to wait status. Wait also return the return status. The return status is generally the exit status of last job in the pipeline process which was put to waiting state. In case of scenario in which no job or process is specified the return status would be zero.
The general syntax of wait command in UNIX operating system is
where n is optional which denote the process or job
killall:
The command killall is used to kill processes which are active. The main aspect in this is killall command can be issued only by the super user.
Profile Answers by GeekAdmin Questions by GeekAdmin
Questions by GeekAdmin answers by GeekAdmin
Related Answered Questions
Related Open Questions