LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-19-2013, 03:50 AM   #1
Igor518418
LQ Newbie
 
Registered: Apr 2013
Posts: 1

Rep: Reputation: Disabled
bash history lost across sessions


Hello,

I'm using windows with cygwin.
My bash history in cygwin is lost between two consecutive shells.

Here are the outputs of some commands that might help to understand the issue:

set -o | grep history
history on

$ grep -i history ~/.bash_profile ~/etc/bash.bashrc ~/etc/profile ~/.profile
grep: /cygdrive/c/cygwin/home/car/etc/profile: No such file or directory
/cygdrive/c/cygwin/home/car/.profile:if [ "x$HISTFILE" == "x/.bash_history" ]; then
/cygdrive/c/cygwin/home/car/.profile: HISTFILE=$HOME/.bash_history

$ ls -la ~/ | grep history -> no output

$ echo $HISTFILE
~/.bash_history
$ echo $HISTSIZE
500
$ echo $HISTFILESIZE
500

grep -i hist .bashrc
# Make bash append rather than overwrite the history on disk
shopt -s histappend
# History Options
# Don't put duplicate lines in the history.
export HISTCONTROL="ignoredups"
# (added) A new shell gets the history lines from all previous shells
PROMPT_COMMAND='history -a'
# HISTIGNORE is a colon-delimited list of patterns which should be excluded.

What could I try to fix this issue ?

Thanks
 
Old 04-19-2013, 06:01 AM   #2
ali.abry
Member
 
Registered: Feb 2013
Posts: 74

Rep: Reputation: Disabled
do you loose all terminal history or only some of the history ? because the history of the last terminal being closed is going to save in history file not all the terminals.
 
Old 04-19-2013, 10:07 AM   #3
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
The Definitive Guide to Bash Command Line History may shed some light. Around the "Modifying History Behavior" entry...perhaps.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash history delete command from bash itself ashishag Linux - Software 6 05-02-2010 03:39 AM
colored bash sessions, each its own history Linux von Scratchen Linux - Software 2 07-13-2009 10:22 AM
Retaining Bash history from all sessions humbletech99 Programming 4 11-29-2007 05:38 PM
LXer: Keeping Command History across Multiple Sessions LXer Syndicated Linux News 1 11-07-2007 10:58 AM
Lost sessions : textmode,KDE... chlorantus Fedora - Installation 0 12-18-2005 09:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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