This is a discussion on bash history...suse 10.1 within the Linux software forums, part of the Linux Getting Started category; bizzarely when I use the the up arrow to go back one command I often just get the command before ...
|
|||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
|||
|
bizzarely when I use the the up arrow to go back one command I often just get the command before the last one i.e. it sometimes skips the command I just did.... is there some intelligence that says 'do not put in history a command that did not work or has been repeated '......but then I use the 'history' command and the command I last did is not there...even though the command worked ?
I have only seen this on suse 10.1, csh (which is bash)....is there an option I can set ? ... I have looked around but nothing seems obvious I am using SUSE Linux Enterprise Desktop 10 (x86_64) - Kernel \r (\l). Thanks in advance |
| Sponsored Links | ||
|
|
|
||||
|
The number of commands to remember in the command history is set via HISTSIZE variable. The default value is 500 command. Did ya set HISTSIZE variable? Try
Code:
echo $HISTSIZE Another thing is your ~/.bash_history may be linked to /dev/null to avoid login of all commands, try Code:
ls -l ~/.bash_history
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
well my histsize is 1000, and the file .bash_history exists and has some stuff in....
so that kind of looks ok... as I say it seems intermitant.... is there a way of traceing my keystrokes and see what they do ? for emple I type $> ls I get ls i type $ ls -l i get ls -l then I up arrow I get 'ls' then i do $>history and I see .. 1137 more /etc/issue 1138 history 1139 ls 1140 history BUT as you can see its over the 1000 HISTSIZE ... should this be allowed ?? |
|
|||
|
it turns out (or rather I just noticed today !) that if you leave a white space between the prompt and the command you want to run it seems to not bother storing it in the history or elsewhere.......
so I guess its not a bug, but not a documented function !! Cheers again |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| MySQL clear history file ~/.mysql_history | raj | Databases servers | 1 | 04-16-2008 09:55 AM |
| How to save history of a hung terminal | ricc | Linux software | 2 | 06-20-2006 12:21 AM |
| Command history | ricc | Linux software | 1 | 04-26-2006 04:57 PM |
| shortcut linux command history | Shell scripting | 1 | 12-26-2005 06:22 PM | |
| want a script keep backup of all users history. | ricc | Shell scripting | 3 | 08-26-2005 12:30 AM |