# How do we save console-screen text to a file?



## max21 (Jun 3, 2014)

How do we save text that is in a console window using plain FreeBSD with no X-Windows or additional applications needed?  I have text on screen under my F2 login that I need to save to a file.  I know it is a built in FreeBSD command-line function because I use to use it but I have forgotten what to type at the command-line.  Would anyone know what it is?


----------



## SirDice (Jun 3, 2014)

You can select the text with the mouse and paste it in a text file.


----------



## benat (Jun 3, 2014)

I would suggest recording the session typescript with script(1).


----------



## SirDice (Jun 3, 2014)

benat said:
			
		

> I would suggest recording the session typescript with script(1).


That would be the better option, yes. But as I read the OP he already has some text on the screen, so script(1) won't help in that case.


----------



## wblock@ (Jun 3, 2014)

There is also vidcontrol(1) with the -p option.  But a mouse with moused(8) allows scrolling back, and script(1) captures everything, including normally invisible escape sequences.


----------



## max21 (Jun 4, 2014)

@SirDice suggested select, cut and paste.  This is what I would normally do but I forgot to dress-up my FreeBSD install before installing ports.  There were some VirtualBox security warnings I wanted to save a copy of.  Today I wrote them down.  I hate missing stuff so I'm going to do a new install and will be adding script(1) to the dress-up.  I've been looking all day for the command I asked about but I can’t find it, even on the web.  I know I got it somewhere on disk and within a week after getting things re-organized for this new install, I will post it the minute I find it.  It will be found. 

Thanks guys

script(1) recommended since 2010: viewtopic.php?&t=17309


----------



## wblock@ (Jun 4, 2014)

This was my better article on script(1): Using script(1).


----------

