sleep command suspends processing for a certain period of time.
For example, when running a heavy shell script, using the sleep command moderately can reduce the load.
# Delay 10 seconds(no option) sleep 10 # Delay 10 seconds sleep 10s # Delay 5 minutes sleep 5m # Delay 3 hours sleep 3h
nice command can be executed with priorities.
For example, when performing a backup or batch process, the process can be performed without affecting other processes.
You will be able to batch process more safely, even at lunchtime when the website is crowded by many people.
# Without option, run at +10 priority nice /path/to/command # Run at +10 priority nice -n 10 /path/to/command
Priority options can be specified from -20 (higher) to 19 (lower). However, negative values can only be specified by superuser.
You can also use the
renice command to adjust the priority of already running processes.
# Adjust the priority of pid 99999 process renice 10 -p 99999
If you use the
nohup command, you can continue processing even if you log out of the terminal.
After executing the command, you can close the computer and go to bed calmly.
nohup /path/to/command &
Standard output during execution of the nohup command is saved in the