Script Terminal Session

script -f /tmp/foo; tail -f /tmp/foo
script -f /tmp/foo will place all output of the terminal, including carriage returns, to a file. This file can be tail dash-eff'ed by one or more other terminals to display the information of the main terminal. Good way to share one's screen on short notice. Note: This produces a very accurate output, but that includes depending on the size of your terminal to be the same. You can clear screens or even resize the terminal for others using this function; I use it in conjunction with the "mid" command in my list.
Sample Output
<Terminal Output from First Terminal is in /tmp/foo>

2011-11-22 15:16:08

What Others Think

If you like that, you'll really love screen(1).
h3xx · 546 weeks ago
Screen is pretty cool, but I haven't been able to do that without setuid. This command can be run on a system by a user without sudo.
robinsonaarond · 460 weeks and 1 day ago
So if you want to try the email sync setting in window 10 PC,now first just click this link sync your settings how to open the sync setting folder,that is very easy,first open the cortana and search this sync folder.
KGF123 · 104 weeks and 3 days ago
Nice to found here knowledgeable blog. I would like to recommend this website to others and excited to read future blog. Regards, Jack.
JackPonting · 96 weeks and 2 days ago
Always so interesting to visit your site.What a great info, thank you for sharing. this will help me so much in my learning ?????
arianna · 78 weeks and 5 days ago
Overall this site called premiercollegebaseball works in amazing way. The reason is the amazing features which they provide. Now I use it on daily basis!
Aaron12 · 27 weeks and 6 days ago
seofox · 14 weeks and 1 day ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this? is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands

Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.


Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: