Blog

nohup

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