| | |
Trouble using nohup with &
![]() |
•
•
Join Date: Nov 2009
Posts: 12
Reputation:
Solved Threads: 0
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??
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??
![]() |
Similar Threads
- Trouble with .htaccess & redirecting dynamic URLs (Linux Servers and Apache)
- Dual-boot trouble--Vista & Ubuntu (*nix Software)
- trouble with laptop & internet (IT Professionals' Lounge)
- Trouble w/OSX 10.3 & Safari, + more. (OS X)
Other Threads in the Getting Started and Choosing a Distro Forum
- Previous Thread: ubuntu server help
- Next Thread: Ctrl-A and pasting in vi editor
| Thread Tools | Search this Thread |
age-related baremetal chrome cio cloudcomputing code commercial computers crystalballsunday developers development distributions distro dsl elderly embedded google http://expertcore.org/ innovations jauntyjackalope kernel library linus linux microsoft multi-core netgear newbies openoffice.org operating operatingsystems parallel performance processing redhat routers smp studios system systembuilders systemintegrators terminalservices thecloud thinclients tools ubuntu users virtualization vmware webbased wikis windows xenon





