nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

bash history...suse 10.1

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 ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 10-12-2007, 08:02 PM
Junior Member
User
 
Join Date: Oct 2007
My distro: suse 10.1
Posts: 3
Rep Power: 0
grogf is on a distinguished road
Default bash history...suse 10.1

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
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 10-12-2007, 08:55 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 564
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

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
If so increase value

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
Reply With Quote
  #3 (permalink)  
Old 10-12-2007, 09:29 PM
Junior Member
User
 
Join Date: Oct 2007
My distro: suse 10.1
Posts: 3
Rep Power: 0
grogf is on a distinguished road
Default ta

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 ??
Reply With Quote
  #4 (permalink)  
Old 10-13-2007, 01:06 PM
monk's Avatar
Senior Member
User
 
Join Date: Jan 2005
Location: Tibet
My distro: Debian GNU/Linux
Posts: 481
Rep Power: 5
monk will become famous soon enough monk will become famous soon enough
Default

You can set to 1000 or whatever you want. so yes it is allowed. Have you modified something related to key storks? bash man page has info about this
__________________
May the force with you!
Reply With Quote
  #5 (permalink)  
Old 10-30-2007, 04:42 PM
Junior Member
User
 
Join Date: Oct 2007
My distro: suse 10.1
Posts: 3
Rep Power: 0
grogf is on a distinguished road
Default thanks to all who replied

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
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT +5.5. The time now is 08:48 AM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36