LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Recording a terminal Session (https://www.linuxquestions.org/questions/slackware-14/recording-a-terminal-session-4175502162/)

linuxtinker 04-18-2014 06:30 AM

Recording a terminal Session
 
I am new to Slackware this year and want to start sharing my experiences setting up slackware. I usually solve my own problems by reading your wonderful posts here. Unfortunately by the time I am done altering config files and entering cli commands I don't remember all the steps I did to fix the problem. I was wondering is there an easy way to record my terminal sessions. I have read about using script but it says it wont work if I use VIM. Is there a way I can record the terminal that will also record the changes I make in vim as well, or maybe use another cli editor that script can record?


Thanks




BTW: I have to say besides slackware being a great distro this community has mad my transition to slack a great experience.

rtmistler 04-18-2014 06:50 AM

Someone else may offer a suggestion more automated. Every time I've thought that this was what I wanted, it turned out that it was more difficulty to me versus using the two methods I am going to suggest. First, the history(3) command will print out your most recent commands up to a certain limit and I believe you can play with a property to see more than the default. The default is pretty large though. The second suggestion is to realize that you're doing stuff which you'll want to remember and repeat; so keep a log via other means.

What I do is I keep open a document, or a draft email and cut/paste my progress in there. Also this is more useful to me because there are things which aren't commands entered which you will want to retain. For instance if there is a setup file which I need to edit and add some lines, and say I did a vi session of a file. The fact that I did the vi shows in my history, however the changes I made will not; so I copy/paste the relevant file chunks into the log that I keep. Furthermore, if I searched the web for a solution and found a great resource, I copy that hyperlink into my log.

I actually do this a lot because I configure and bring up many prototype boards, build a bootloader and kernel for them and have to configure the kernel and bootloader for our intended applications. As a result it's days of experimentation and customization, a lot of the work may be failed experimentation where I will not care to retain my failed efforts, but the really difficult to attain issues definitely require me to keep a detailed log of actions, attempts, and results so that I can repeat and devise better methods for the next iteration.

So, to me it's more than just an organized history of command I've entered, it's instead the extra information which came from that whole picture.

Habitual 04-18-2014 08:22 AM

http://showterm.io/

BenCollver 04-18-2014 08:43 AM

http://slackbuilds.org/repository/14...cordmydesktop/

TracyTiger 04-18-2014 10:26 AM

Me Too
 
Quote:

Originally Posted by rtmistler (Post 5155013)
The second suggestion is to realize that you're doing stuff which you'll want to remember and repeat; so keep a log via other means.

The points made in that post are excellent. Just to let you know that rtmistler isn't alone. I've also found that "...keep a log via other means." has worked best for me.

I simply keep a written log, similar to a laboratory notebook which I record the sequential steps of my "experiment" and add notes and references such as WHY something worked or didn't work. When I occasionally have a success :) I separately summarize the steps to that success.

This out-of-band method could be done by typing into a second computer rather than handwritten for those, like the OP, who want to share their activities.

In some environments the logging computer can be connected to the target computer as a console to facilitate copy/paste functions. I mention this because much of the time the issue involved is the boot sequence when the target machine has limited resources available for recording/typing/editing. But I imagine it's rare to find an environment these days where one can connect a logging console up via the serial port. (showing my age)

Quote:

Originally Posted by rtmistler (Post 5155013)
So, to me it's more than just an organized history of command I've entered, it's instead the extra information which came from that whole picture.

I found another advantage to "writing/typing" rather than simply "recording" is similar to why one designs a program rather than to just start coding. The process encourages one to think about the process rather than just trial-and-error.

ruario 04-18-2014 12:50 PM

http://shelr.tv/ works pretty well

Habitual 04-18-2014 04:13 PM

Terminator does "logging" very well.

justwantin 04-18-2014 04:15 PM

I also keep text file notes, have been doing that for a long time, and keep them all in one directory in my /home/~. I also make up one liner scripts for very long commands that I will use again and keep them in /usr/local/bin. That way I can refer to them or use them using just a one word command in a terminal.

Richard Cranium 04-18-2014 06:41 PM

The following advice reminds me of a joke, but here goes...

Never do anything that cannot be accomplished by a shell script. (Or perl script or python script or ruby script or awk script....)

Instead of doing the thing directly, you write the script that does the action. Save the script. There's your record.

Oh yeah, it's this joke:
Quote:

There was a pilot coming into the Seattle airport through thick fog when his instruments went out.
He was circling around and he saw a tall building with a guy working alone on the top floor. He cut the engine and rolled down the window and yelled, "Hey where am I?"
The man said, "You're in an airplane." The pilot made a 275 degree turn and brought the plane in for a perfect landing on the runway 5 miles away just as the fuel has run out. The passengers were amazed and asked how he did it.
The pilot said, "It was easy. I asked the guy in that building a simple question. The answer he gave me was 100 percent correct an absolutely useless, therefore, that must be Microsoft's support office and from there the airport is five miles due East."

enorbet 04-19-2014 12:41 AM

Hello
This may do more than what you're asking but it is very cool and worth a look -

https://asciinema.org/

linuxtinker 04-19-2014 09:06 AM

Thanks for all the replies guys....(like the joke Richard)
Ill probably end up using more then one of the solutions suggested, depending on what I am setting up at the time. Ill mark the link as solved, but if anyone else would like to share, please do..

rtmistler 05-06-2014 08:04 AM

Here's a full solution just posted today by onebuck http://www.linuxquestions.org/questi...09#post5165609

NeoMetal 05-06-2014 03:49 PM

Edit: Sorry, didn't read op fully


All times are GMT -5. The time now is 09:17 PM.