December 1999
Beginner
528 pages
11h 10m
English
If you are running a process and you don’t think it will be completed by the time you log out for the day, use the nohup command. Nohup will continue processing when you exit your account. Nohup means no hang up.
The general format of the command is:
nohup command &
Any output from your job will be redirected to a file called ‘ nohup.out ’, unless you specify otherwise with
nohup command >myout.file 2>&1
which sends all output to the file myout.file.
Let’s do an example and test that it actually does continue working after you have logged out. We’ll kick off a log cleanup script called ps1.
$ nohup ps1 &
[1] 179
$ nohup: appending output to `nohup.out`
Now exit the shell, log back ...
Read now
Unlock full access