How can I see the output console after running a nohup command?

MTT

I have a code running on a Linux server. Since it takes hours to run, I have to use nohup to make sure my code is still running in case I loose my connection to the server. Again since I have to wait hours to see the results, I defined a counter to print out the progress of my code (%). If I loose my connection to the server or close the terminal, the only way that I can see the code is still running is using top. Is there any way that I can see again the output console (message showing the progress)?

Mike Atkins

You can redirect standard output and standard error to a file and look at that file. eg:

nohup command 2>&1 > outputfile &

note default behavior from man page:

If standard output is a terminal, append output to 'nohup.out' if possible, '$HOME/nohup.out' otherwise. If standard error is a terminal, redirect it to standard output

so really you can just run

nohup command &

and then look in nohup.out

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How can I 'nohup' a command and log the output of 'time'

From Dev

how i can see the output console result in netbeans

From Dev

See output of command running in background

From Dev

How can I look into nohup file while the program is still running?

From Dev

How can I look into nohup file while the program is still running?

From Dev

How can I see console.log output in a node express app when using nginx + passenger

From Dev

How to call batch from powershell so I can see realtime output in powershell console

From Dev

How can I redirect nohup output to a specified file?

From Dev

How to see output on command prompt by running a jar/exe file?

From Dev

How can I get the correct end time of a nohup command?

From Dev

How can I see what processes are running?

From Dev

How can I clear console after running my console app Windows CMD?

From Dev

How can I see dmesg output as it changes?

From Dev

How can I see printf output when evaluating an expression using the `expr` command in lldb?

From Dev

Can I see the summed up results of the ping command while it is running?

From Dev

How can I hide the command I'm using in an MSBuild Exec task from console output?

From Dev

How to display console output when running program from command prompt

From Dev

How can I see the difference in lsusb output before and after device plugin?

From Dev

How can i redirect command output in OS X to both console and file at the same time

From Dev

How to get console output(in code) after running configurations in eclipse?

From Dev

How can I redirect console output to file?

From Dev

How can I suppress NUnit console output?

From Dev

How can I redirect console output to file?

From Dev

Can I run the nohup command from tcsh

From Dev

How can I keep console window after executing a command in Inno Setup

From Dev

Chrome console errors - how can I see the time the error occured?

From Dev

How can I treat the output of a command as a file?

From Dev

How can I get the output of an ssh command?

From Dev

How can I get the output of an ssh command?

Related Related

  1. 1

    How can I 'nohup' a command and log the output of 'time'

  2. 2

    how i can see the output console result in netbeans

  3. 3

    See output of command running in background

  4. 4

    How can I look into nohup file while the program is still running?

  5. 5

    How can I look into nohup file while the program is still running?

  6. 6

    How can I see console.log output in a node express app when using nginx + passenger

  7. 7

    How to call batch from powershell so I can see realtime output in powershell console

  8. 8

    How can I redirect nohup output to a specified file?

  9. 9

    How to see output on command prompt by running a jar/exe file?

  10. 10

    How can I get the correct end time of a nohup command?

  11. 11

    How can I see what processes are running?

  12. 12

    How can I clear console after running my console app Windows CMD?

  13. 13

    How can I see dmesg output as it changes?

  14. 14

    How can I see printf output when evaluating an expression using the `expr` command in lldb?

  15. 15

    Can I see the summed up results of the ping command while it is running?

  16. 16

    How can I hide the command I'm using in an MSBuild Exec task from console output?

  17. 17

    How to display console output when running program from command prompt

  18. 18

    How can I see the difference in lsusb output before and after device plugin?

  19. 19

    How can i redirect command output in OS X to both console and file at the same time

  20. 20

    How to get console output(in code) after running configurations in eclipse?

  21. 21

    How can I redirect console output to file?

  22. 22

    How can I suppress NUnit console output?

  23. 23

    How can I redirect console output to file?

  24. 24

    Can I run the nohup command from tcsh

  25. 25

    How can I keep console window after executing a command in Inno Setup

  26. 26

    Chrome console errors - how can I see the time the error occured?

  27. 27

    How can I treat the output of a command as a file?

  28. 28

    How can I get the output of an ssh command?

  29. 29

    How can I get the output of an ssh command?

HotTag

Archive