20
Jun/09
2

Linux: nohup: Execute a command after exiting a shell

This is quite useful. I used to push jobs to the background and then exit shell, but it wasn’t an easy task considering I have short term memory issues (not a complete retard, just too much on my mind ;) ). I found this awesome little command to have the commands or scripts run right after I’m off the wagon!

nohup

That’s it… simply run your comman with it:

nohup command

Don’t forget the ampersand at the end. Use absolute path for scripts:

nohup ~/script &

If your scripts requires additional options to run, use a quote right before the ampersand:

nohup ~/script "start" &

Note that you don’t need to use this for your wget command… wget comes with a built-in switch (b):

wget -b 

Have fun!

Related posts:

  1. Linux: htpasswd: command not found
  2. Linux: Download files using wget from protected url’s – resume broken downloads
  3. Linux: Install NX server – RPM package

Filed under: Linux
You are not authorized to see this part
Please, insert a valid App ID, otherwise your plugin won't work correctly.
Comments (2) Trackbacks (0)
  1. Thomas
    7:24 AM on June 24th, 2009
    IceWeasel 2.0.0.19 IceWeasel 2.0.0.19 Debian GNU/Linux Debian GNU/Linux
    Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.19) Gecko/20081202 Iceweasel/2.0.0.19 (Debian-2.0.0.19-0etch1)

    A much smarter way to do it would be to run things like this in screen. It allows you to just detach the screen and go back later and look at what it did.

  2. Ali
    11:30 AM on September 2nd, 2009
    Firefox 3.5.2 Firefox 3.5.2 Windows 7 Windows 7
    Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.2) Gecko/20090729 Firefox/3.5.2 (.NET CLR 3.5.30729)

    Screen and nohup are like apples and oranges in my opinion.

Leave a comment

No trackbacks yet.

Plugin from the creators of Brindes Personalizados :: More at Plulz Wordpress Plugins