LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Retrieving previous command for all users (https://www.linuxquestions.org/questions/linux-newbie-8/retrieving-previous-command-for-all-users-869307/)

ntu929 03-17-2011 11:00 PM

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

frankbell 03-17-2011 11:34 PM

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.

kbp 03-17-2011 11:36 PM

Each user will have a '.bash_history' file in their home directory, not sure about saving sessions


All times are GMT -5. The time now is 11:44 PM.