LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-29-2013, 11:05 PM   #1
BlackGarnet
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Rep: Reputation: Disabled
Automatically save a terminal session?


I am just learning Unix. Is there a way to program my OS to record or save every konsole session I create in a file automatically upon closing? I would really like to be able to go back later and see what I typed. If so, can I have it saved into a specific folder I create?

Thank you!!!
 
Old 01-29-2013, 11:14 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
The history cmd should show previous cmds, unless its been disabled. Default is usually 'on'.
http://linux.die.net/man/1/bash
 
Old 01-30-2013, 12:11 AM   #3
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,200

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
what he said
the 'history' command will save up to i believe the last 1000 commands
the output looks like this
Code:
 1039  asunder
 1040  grip
 1041  sudo yum install grip
 1042  vb
 1043  grip
 1044  alsamixer -c 0
 1045  cd 
 1046  clear
 1047  ls
 1048  cd yos
 1049  clea
 1050  alsamixer -c 0
 1051  history
note if i type a ! followed by one of the numbers in the first colum
eg
Code:
$ !1051
would re-issue that command
 
Old 01-30-2013, 01:18 AM   #4
BlackGarnet
LQ Newbie
 
Registered: Jan 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
I was hoping to save each session as a text file, or something of the like, so that I could go back at a later date and see exactly what I was doing. Although I like being able to go back and see what commands I used.
 
Old 01-30-2013, 01:22 AM   #5
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,200

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
you could do

Code:
history > file.txt
as for saving the terminal session, probably a screen recorder would work.
 
Old 01-30-2013, 01:42 AM   #6
Kaustubh5@ymail.com
LQ Newbie
 
Registered: Jan 2013
Location: India
Distribution: RedHat,Fedora
Posts: 11

Rep: Reputation: Disabled
you can try using screen command

# screen

This will open a new session for you in the same terminal. Once you are done with the work you can use 'Ctrl+Ad' to detach.

When you want to resume you can user #screen -r

once you detach you can close that terminal, however your screen session will be active.(Just dont reboot :P)

more details 'man screen'

Cheerzzz
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
make commands keep running after leaving a terminal session or ssh session Danny3031 Programming 18 01-30-2012 12:29 PM
Switching back to the Mandrake 9.1 desktop from terminal rdesktop terminal session marc218 Linux - General 6 02-08-2007 03:45 PM
save terminal session cad Linux - General 1 12-31-2006 06:12 AM
xfce4-session fails to save session ! OneManArmy Debian 0 12-10-2004 03:14 PM


All times are GMT -5. The time now is 03:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration