Attach to a processes output for viewing

前端 未结 7 863
北荒
北荒 2020-12-12 08:26

How would I \'attach\' a console/terminal-view to an applications output so I can see what it may be saying?

How would I detach from an applications output without k

7条回答
  •  半阙折子戏
    2020-12-12 09:10

    I wanted to remotely watch a yum upgrade process that had been run locally, so while there were probably more efficient ways to do this, here's what I did:

    watch cat /dev/vcsa1
    

    Obviously you'd want to use vcsa2, vcsa3, etc., depending on which terminal was being used.

    So long as my terminal window was of the same width as the terminal that the command was being run on, I could see a snapshot of their current output every two seconds. The other commands recommended elsewhere did not work particularly well for my situation, but that one did the trick.

提交回复
热议问题