Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can we dump the output of ncurses based programs to a file in Linux?

I tried using tee command, it does not work. I need to get the output of some ncurses bases program (iftop) dumped to a file. Do you know how to do it ?

like image 344
sul4bh Avatar asked Oct 12 '22 08:10

sul4bh


2 Answers

You could try ttyrec or termrec. These programs actually make a recording of the output over time. If you need just a static picture, I think xterm can save a dump of what is currently on the screen.

like image 189
Random832 Avatar answered Oct 15 '22 09:10

Random832


There is a "man script" utility installed out of the box with most linux distros. It can produce replayable typescripts when option --timing given.

like image 23
antono Avatar answered Oct 15 '22 11:10

antono