附加到流程输出以进行查看 [英] Attach to a processes output for viewing

查看:83
本文介绍了附加到流程输出以进行查看的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何将控制台/终端视图附加"到应用程序输出,以便我可以看到它在说什么?

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 killing the application?

通常,如果您使用命令行启动健谈的应用程序,则会看到各种精彩的输出.但是,假设我正在运行一个特别健谈的编程程序(例如KINO),并且我想在任何给定时刻查看其输出,而不必通过命令行重新启动它.我不能;至少我不知道如何.

Normally if you fire up a talkative application using the command line you get to see all kinds of wonderful output. However, let’s say I have a particularly chatty programming running, like KINO, and I want to view its output at any given moment without restarting it through the command line. I cannot; at least I don't know how.

推荐答案

此处有一些选项.一种是将命令的输出重定向到文件,然后使用"tail"实时查看添加到该文件的新行.

There are a few options here. One is to redirect the output of the command to a file, and then use 'tail' to view new lines that are added to that file in real time.

另一个选择是在屏幕"内部启动程序,屏幕"是一种基于文本的终端应用程序.屏幕会话可以连接和分离,但名义上只能由同一用户使用,因此,如果要在用户之间共享屏幕会话,那就麻烦了.

Another option is to launch your program inside of 'screen', which is a sort-of text-based Terminal application. Screen sessions can be attached and detached, but are nominally meant only to be used by the same user, so if you want to share them between users, it's a big pain in the ass.

这篇关于附加到流程输出以进行查看的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆