LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 04: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, 07: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, 11:07 AM   #3
Habitual
LQ Addict
 
Registered: Jan 2011
Location: Youngstown, Ohio
Distribution: LM17.1/Xfce4.11.8
Posts: 7,163
Blog Entries: 10

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


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
Bash history delete command from bash itself ashishag Linux - Software 6 05-02-2010 04:39 AM
colored bash sessions, each its own history Linux von Scratchen Linux - Software 2 07-13-2009 11:22 AM
Retaining Bash history from all sessions humbletech99 Programming 4 11-29-2007 06:38 PM
LXer: Keeping Command History across Multiple Sessions LXer Syndicated Linux News 1 11-07-2007 11:58 AM
Lost sessions : textmode,KDE... chlorantus Fedora - Installation 0 12-18-2005 10:29 PM


All times are GMT -5. The time now is 12:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration