AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  Command 'history' won't show more than 15 entries

    Posted Fri September 25, 2009 02:33 PM

    Originally posted by: olddawgnewtrix


    I'm a user on AIX 5.3, and I'm trying to get the history command to show more than 15 entries. I'm using ksh. I'f I set HISTSIZE to 5 in my .profile, it limits history output to 5 entries. If I set it to 20, I still see only the 'default' 15 entries (what I see without any customization on my part). I'm not terribly upset at only seeing the last 15 commands, but I'd like to know what's going on.

    TIA,
    #AIX-Forum


  • 2.  Re: Command 'history' won't show more than 15 entries

    Posted Fri September 25, 2009 04:27 PM

    Originally posted by: TimGilson


    OK - you are doing the right thing by telling the shell how many commands you would like it to store using the HISTSIZE variable but when you want to view a specific number of previous commands, you use the following syntax:

    
    history -7
    


    will display your last seven commands. Alternatively using:

    
    history 18
    


    will show all your commands from the eighteenth to the most recently issued.

    I hope this helps!
    #AIX-Forum


  • 3.  Re: Command 'history' won't show more than 15 entries

    Posted Tue September 29, 2009 08:56 AM

    Originally posted by: datta13


    history -<number> displays you the no of history commands,

    eg:- if you want to see last 100 history commands use
    history -100

    HISTSIZE is used to set not to repeate passwords, if HISTSIZE is 5 then you can use the old password for 5 times.
    #AIX-Forum


  • 4.  Re: Command 'history' won't show more than 15 entries

    Posted Wed September 30, 2009 12:07 PM

    Originally posted by: SystemAdmin


    datta13: You mistook HISTSIZE variable with histsize user attribute. HISTSIZE variable determines the number of previous commands to remember, whereas histsize user attribute remembers the last x number of passwords.

    r/
    R
    #AIX-Forum


  • 5.  Re: Command 'history' won't show more than 15 entries

    Posted Thu October 15, 2009 04:44 PM

    Originally posted by: olddawgnewtrix


    I think I got it figured out. With the $HISTSIZE env var I'm setting the number of the commands to store for recall, and the default returned from the history command is 15, but I can return more with a numeric argument, up to the amount stored.

    thanks all
    #AIX-Forum