Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 03-17-2011, 11:00 PM   #1
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 ?
Old 03-17-2011, 11:34 PM   #2
LQ Guru
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 14,285
Blog Entries: 24

Rep: Reputation: 3902Reputation: 3902Reputation: 3902Reputation: 3902Reputation: 3902Reputation: 3902Reputation: 3902Reputation: 3902Reputation: 3902Reputation: 3902Reputation: 3902
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, 11:36 PM   #3
Senior Member
Registered: Aug 2009
Posts: 3,790

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


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

All times are GMT -5. The time now is 02:19 PM.

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