LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 04-04-2006, 10:40 PM   #1
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Rep: Reputation: 30
Suddenly my history command do nothing


Dear friends,

I used history command a lot before. But somehow it doesn't work anymore. When I type history, nothing shows up. And the up and down arrow doesn't display the last command I typed.

Is there a disable command to disable it? maybe my colleague disabled it>....

thanks for helping.

Regards
Y
 
Old 04-05-2006, 03:38 AM   #2
mickyg
Member
 
Registered: Oct 2004
Location: UK
Distribution: Ubuntu/Kubuntu
Posts: 249

Rep: Reputation: 30
Your bash history is stored in a file called .bash_history in your home directory. If that's empty then someone (root presumably) must have cleared it. Please tell us if you have anything in that file.

Issue this command in bash.

Code:
cat ~/.bash_history

Last edited by mickyg; 04-05-2006 at 03:40 AM.
 
Old 04-06-2006, 08:40 PM   #3
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Original Poster
Rep: Reputation: 30
Thanks Mickeyg.

I checked .bash_history. Yes you are right. its is empty in there. But how do I enable history to be activated again?

thanks a lot for taking time helping,
Really appreciate your help.

Regards
Y
 
Old 04-07-2006, 04:57 AM   #4
PDock
Member
 
Registered: Aug 2004
Distribution: Slack10 & curr. tried numerous
Posts: 189

Rep: Reputation: 37
Check that .bash_history is still owned by you with
Code:
ls -l .bash_history
from your home directory.

As root use chown to reset back to your username; only reason I can think of why your history is not captured.
 
Old 04-26-2006, 01:06 AM   #5
Niceman2005
Member
 
Registered: Nov 2004
Distribution: Fedora Core 2
Posts: 330

Original Poster
Rep: Reputation: 30
Hi,

I checked the owner of the .bash_history file, its all right. Own by root and its a root history.
Don't know why what ever I do i cannot get the history back. even when I log into another account and check the history i cannot find any history there.
any other way to solve the problem beside reinstalling the whole thing?

pls help...thanks...

regards
y
 
  


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
History command amer_58 Linux - General 5 06-24-2005 12:26 PM
history clear command suguname Linux - Newbie 5 03-05-2005 09:32 AM
F8 for command history in bash titanandrews Linux - General 7 10-15-2004 03:25 PM
Command history? King4lex Linux - Newbie 4 09-03-2004 08:35 PM
History command, How to get the date? philipina Linux - General 2 08-05-2004 05:58 PM

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

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