LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 03-17-2011, 10:00 PM   #1
ntu929
Member
 
Registered: Jun 2010
Location: India
Distribution: Ubuntu
Posts: 128

Rep: Reputation: 4
Retrieving previous command for all users


Hi All,

Allow me to submit that i did a mistake of not saving the work which i done in the past few months. i have used history command to see the previous commands.

But trouble is that since i had worked a lot on gnome-terminal, only last 1000 commands are shown.

Is it possible to see list of all the previous commands for all users.

Also, sorry if this sounds absurd, but is it possible to save the details of a session onto a single file ?

I not sure but when i had worked on vector Linux, i had used some command to save sessions at the terminal. Is there any analogous command in Ubuntu 10.04 also ?


Please tell how to get back the details ?
Regards
 
Old 03-17-2011, 10:34 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,311
Blog Entries: 28

Rep: Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137Reputation: 6137
The commands are stored in the .bash_history file in each user's home directory.

See man 1 bash for information about the history size.

As far as I know--and I'm not a guru, just a user--once a command has been pushed out of the .bash_history file, it's gone.
 
1 members found this post helpful.
Old 03-17-2011, 10:36 PM   #3
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Each user will have a '.bash_history' file in their home directory, not sure about saving sessions
 
1 members found this post helpful.
  


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
use output of previous command as parameter to another command raviluchmun Linux - Newbie 4 11-14-2010 12:35 AM
[SOLVED] redirecting STDOUT of previous command to STDIN of next command urban.yoga.journeys Linux - General 9 11-22-2009 03:16 AM
vi help, how to modify previous command ufmale Linux - Newbie 1 09-05-2008 12:20 PM
Hide previous users mdlinuxwolf MEPIS 1 07-18-2008 11:57 AM
Retrieving email using the command line/console wimnat Linux - General 2 01-26-2005 09:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:34 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