Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?

share|improve this question
3  
Did you exit the shell before viewing the file? –  ddeimeke Nov 25 '11 at 14:34
add comment

1 Answer

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.

share|improve this answer
    
Thanks a lot Rilindo, it works.... –  Ruby Nov 27 '11 at 6:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.