Which 2 commands to run in pipe using nohup ??
Hello Everybody !!
I want to run 2 commands in pipe, to run using "nohup", after i log out. The syntax is : $ nohup [command1] & | nohup [command 2] & I need to have 2 such commands that run for some time so that i can monitor them using the ps command after i log out. Can someone tell me which commands to use ? Thanks in advance. |
Your question makes no sense as written.
Which "commands" totally depends on what you want to happen. And how can you monitor them with ps after you logout? You are logged out! Please try again to explain what you really want. |
i believe running
Code:
nohup command1 | nohup command2 & |
Thanks ilesterg, i tested the format that u have mentioned to be working.
But in my case, i used the printf and cat command in this way : $ nohup printf " ." | cat > output.txt & But when i run ps, i am unable to capture the process IDs of cat and printf as they run very fast.. which ps is unable to capture. I therefore need two such commands whose PID's can be captured with ps while they are running. Could you plz tell any 2 such commands ? Thanks in advance !! |
@astrogeek : the nohup command allows you to run commands even when u are logged off.
and one can monitor those processes with ps from another user's terminal.. |
printf will be executed very quickly, you need to find something else (which runs longer). For example: ls -lR /
|
Quote:
Try this: Code:
nohup netstat -c | cat >/dev/null & |
All times are GMT -5. The time now is 12:07 AM. |