retty 是个拦截终端输出的工具
retty is a tiny tool that lets you attach processes running on other terminals. So you were running that mutt outside of screen at your home machine and now wanna check your mail? Attach it with retty, do whatever you want, detach it again and everything is as it was before. You don't have to run them all in screen just in case.
有时候把一个程序放在了后台执行,一段时间后想抓回来,或者这程序是由桌面运行的,没法得到控制她的终端,那就可以试试 retty 了
先 ps ax 或者 pidof 得到后台程序的 PID, 再终端里执行 retty PID 就把那程序弄到当前了
Feed