LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-07-2010, 07:15 AM   #1
nikunjbadjatya
Member
 
Registered: Sep 2009
Location: Bangalore
Posts: 33

Rep: Reputation: 0
Terminal contents


Hi,
Is there any file by which I can see what has happened inside the various terminals I use ?
ex. suppose I give

$ ls -la
.........
.........
.........

$ vim /some/file/
$ cd /some/dir/
$ ./somescript.sh
........
........


etc etc..
I want not only the history of command used, but also there output as shown in the terminal. i.e I want the output of "ls -la" also etc.
A file which has whatever you type/get on the terminal.

Is there any system file which stores "all" the contents of "all" the terminals in use?
I know the use of redirection operators , but for those commands its not done.?

Kindly help.!

Thanks,
Niks
Bangalore, India
 
Old 06-07-2010, 07:22 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
I really doubt that there is anything like this---In my case, such a file would become very large in a matter of days.

I believe that--at the beginning of a session--you could set up a redirect to a file. Then you can probably do something like call the terminal program with that command as a first argument.
 
Old 06-07-2010, 07:30 AM   #3
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
If you want to send the output of a command to a file, use:

Code:
command > file
If you want stderr to go in the file too, place an '&' before the '>'.
 
Old 06-07-2010, 09:24 AM   #4
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
Wow, a history of commands is most often more than I want. The output of them would probably mean I couldn't find the needle for the haystack.

However, you might take a look at screen. You can set up a history buffer in screen which includes all the output on the terminal. It can create a screen log file as well as a scroll back buffer. Take a look at the -L and -h options.
 
  


Reply



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
How do I resize the terminal window from the command line in the gnome terminal QuIcKSpArK Linux - Newbie 5 04-21-2012 02:04 PM
not screen-blanking in terminal - what sets the idle timeout on monitor for terminal stardotstar Linux - Hardware 2 08-14-2011 05:46 AM
how to mount the cd & copy the contents of the cd from terminal window in linux? helpdeskmtv General 2 10-19-2007 09:33 AM
Switching back to the Mandrake 9.1 desktop from terminal rdesktop terminal session marc218 Linux - General 6 02-08-2007 02:45 PM
list contents of directory without listing contents baddah Linux - Newbie 2 06-12-2006 04:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:24 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
Open Source Consulting | Domain Registration