chandini.david 0 Newbie Poster

Hey!!

I'm trying to use the nohup command in background mode (i.e. with the '&' at the end.)

When I generally run the program, I use the command:
./xyz "argument 1" arg 2 arg 3 arg 4 > output.txt

This works fine. Even when I append nohup to it, i.e. type:
nohup ./xyz "argument 1" arg 2 arg 3 arg 4 > output.txt
it works fine. The file output.txt is created and contains the correct data.

However, when I add the '&' sign at the end, as in:
nohup ./xyz "argument 1" arg 2 arg 3 arg 4 > output.txt &
it doesn't work... I mean it shows me a PID, and when i run 'ps', it shows that the process is running... But after I kill the process and check output.txt, the file is empty!!! I even tried checking the file without killing the process first - that didn't help either... where am I going wrong??