In the command line, I typed:

script -a myfile

Then, I typed the some standard commands.

When I opened the myfile using vi, the file was empty. Why is that? And, also, any tips on using the ttyrec and ttyplay commands?

  • 3
    Did you exit the shell before viewing the file?
    – ddeimeke
    Nov 25, 2011 at 14:34

1 Answer 1


It doesn't look like your implementation of script is flushing the output by default. If it available, try this:

script -f -a myfile

That said, I would suggest that you use more or less commands to view the file. In fact, you probably want to view that file in a separate login session, as your vi/more/less session will be flushed to the file in realtime.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .