Question

It seems that there is no difference between nohup and at now, but maybe there are subtleties?

Was it helpful?

Solution

The difference is that now runs a command that can respond to HUP signal, where as the nohup runs a command that is immune to HUP signal.

OTHER TIPS

Ed Heal is right. But another difference is that something run by nohup still has a controlling terminal, whereas something run by at now does not.

In addition to that, backgrounding something with nohup causes it to run immediately, whereas at now simply queues something to be run the next time atrun(8) runs. In BSD unix, (FreeBSD/OpenBSD) at jobs are launched by atrun which is launched periodically by cron (or launchd in OSX). In Linux, at jobs are run by at's own daemon, atd, which by default launches jobs every 60 seconds.

Other flavours of unix may have different strategies, but in most cases you'll probably find that jobs launched by at now are less immediate than jobs launched using nohup.

nohup tells the system to continue running even after you log out. at is used to execute a command or multiple commands once at some future time.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top