nohup
๊ฐ์
โข
Linux, Unix ์์ HUP(hangup) Signal ์ ๋ฌด์ํ๊ณ ๋ช
๋ น์ด๋ฅผ ์คํ์ํค๋ ๋ช
๋ น์ด
โข
ํ์ค ์ถ๋ ฅ์ nohup.out ํ์ผ์ ์ถ๋ ฅํจ
โฆ
ํ์ผ ์์น๋ ๋ณ๊ฒฝ์ด ๊ฐ๋ฅํ๋ค
โข
daemonize ์ ๋์ผํ ๊ธฐ๋ฅ
์ฌ์ฉ๋ฒ
โข
ํ์ค ์ถ๋ ฅ
# ์ผ๋ฐ์ ์ธ ์ถ๋ ฅ
$ echo 'Hello World'
Hello World
# nohup
$ nohup echo 'Hello World'
nohup: ignoring input and appending output to 'nohup.out'
$ cat nohup.out
Hello World
# ํ์ผ ์ถ๋ ฅ
$ nohup echo 'Hello World' > test.txt
nohup: ignoring input and redirecting stderr to stdout
$ cat test.txt
Hello World
# ์ถ๋ ฅ ์ํ๊ธฐ
$ nohup echo 'Hello World' > /dev/null
nohup: ignoring input and redirecting stderr to stdout
$ cat nohup.out
cat: nohup.out: No such file or directory
Shell
๋ณต์ฌ
โข
background ์คํ
$ nohup ./shell.sh &
nohup: ignoring input and appending output to 'nohup.out'
$ ps -ef | grep shell.sh
...
Shell
๋ณต์ฌ
์ถ์ฒ
โข
https://en.wikipedia.org/wiki/Nohup



