LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-27-2006, 03:34 AM   #1
paraiso
Member
 
Registered: Apr 2005
Distribution: Fedora Core 4
Posts: 88

Rep: Reputation: 15
Question Shell History


Hello,

For some reason or another, my shell history got deleted. I don't know what could be the reason. Is it possible to retrieve those commands history? and where in the file system is located the commands history file?

Thank you in advance for your help!
 
Old 07-27-2006, 03:38 AM   #2
spooon
Senior Member
 
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Well if they're deleted, I don't think you're going to find them.

It depends on your shell. For bash, it's in ~/.bash_history by default.
 
Old 07-27-2006, 03:39 AM   #3
prozac
Member
 
Registered: Oct 2005
Location: Australia
Distribution: slackware 12.1
Posts: 753

Rep: Reputation: 32
try
"echo $HISTFILE"
this will show you which history file bash is using. you say your shell history got deleted. did you delete it accidently or somebody else did that maliciously. check it out.
 
Old 07-27-2006, 04:17 AM   #4
paraiso
Member
 
Registered: Apr 2005
Distribution: Fedora Core 4
Posts: 88

Original Poster
Rep: Reputation: 15
Thanks for your answers!
I checked the history file, the commands have been erased. I was the only one to have access to the machine, I don't remember at all erasing the history.

Cheers
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: CLI Magic: Using command history in the bash shell LXer Syndicated Linux News 0 07-03-2006 12:54 PM
Download history and copy history? inverted.gravity Linux - Newbie 1 02-21-2006 12:31 PM
Erase shell history mikeshn Linux - General 1 04-25-2004 08:28 AM
How to find back "history" database after "history -c" ? san_lss Linux - Newbie 1 01-07-2004 11:53 AM
History neohybrid1 Linux - General 1 12-03-2002 04:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:42 AM.

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