LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-29-2007, 04:56 AM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Rep: Reputation: 86
Is .bashrc supposed to be cleaned at some point ?


I'm always troubled when, suddently, my bash history disappears.
So is it an automatic procedure ?

-----EDIT
Of course i made a mistake: i talk about .bash_history

Last edited by Linux.tar.gz; 12-29-2007 at 06:41 PM.
 
Old 12-29-2007, 06:17 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,118
Blog Entries: 54

Rep: Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787
The .bashrc is a file the shell can source, it is not your shell history. Regardless I don't know any package that wipes your ~/.bash_history by default. If this happens I'd make sure to check with other users (if any) and check login records (last, lastb) and system and daemon logs for anomalies.
 
Old 12-29-2007, 06:41 AM   #3
wit_273
Member
 
Registered: Mar 2007
Location: Nebraska
Distribution: CentOS
Posts: 82

Rep: Reputation: 15
.bash_history stores the most recent 500 entries in the user shell. It can be edited manually be editing the ~/.bash_history file but should not be automatically cleaned out-- except for entries greater then 500. If you are finding your history to be emptied often I would be concerned about a rootkit, or a user who is doing something they are trying hide (which is potentially just as a bad as a rootkit).

As unSpawn said you should look at your logs and who has been logged in when--but this may prove difficult because if something malicious is going on log accuracy is suspect also. Start off by installing (if not already installed) chkrootkit and rkhunter (root kit hunter) Run both program and see if they find any problems. If they find a problem start there in your investigation as to what is going on but note that both programs have a level of false positives due to their purposes. The results should only be used as a start--don't delete files they find to be a problem without first investigating and verifying the problem.
 
Old 12-29-2007, 06:45 PM   #4
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
Of course i made a mistake: i talk about .bash_history ...

It's not the first time i see this file cleaned on Slackware. Maybe, arrived to 500 commands, the file is blanked ?

Thanks for advices. I checked, but nothing seems suspicious.
 
Old 12-29-2007, 09:45 PM   #5
sauce
Member
 
Registered: Oct 2005
Distribution: Slackware, Ubuntu
Posts: 52

Rep: Reputation: 15
thats not supposed to happen. please do this and reply with the output:

ls -l ~/.bash_history

i am looking to see ownership and permissions.

edit: this is what mine looks like.

-rw------- 1 sean users 8827 2007-12-29 16:11 /home/sean/.bash_history
 
Old 12-31-2007, 06:32 PM   #6
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,227

Original Poster
Rep: Reputation: 86
-rw------- 1 joe users 10518 2008-01-01 01:30 /home/joe/.bash_history
 
  


Reply


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
Setting path: /etc/profile, /etc/bashrc or ~/.bashrc Swakoo Linux - General 1 08-07-2007 10:59 PM
How often does /tmp get cleaned up? TheRealDeal Red Hat 1 11-29-2006 09:57 AM
can this directory be deleted/cleaned... cbjhawks Suse/Novell 1 08-30-2006 04:18 PM
Cleaned up colinstu General 1 06-17-2005 03:46 PM
cleaned up /tmp now can't get into kde fobius Slackware 16 01-08-2005 08:34 PM


All times are GMT -5. The time now is 05:30 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration