Find the answer to your Linux question:
Results 1 to 8 of 8
history command gives me last 1000 executed commands only...how to increase this limit ???(to view last 2000 or 3000 commands)...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,769

    Smile history command


    history command gives me last 1000 executed commands only...how to increase this limit ???(to view last 2000 or 3000 commands)
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  2. #2
    Banned CodeRoot's Avatar
    Join Date
    Sep 2005
    Posts
    567
    (I am assuming you are in a bash environment...)

    Code:
    man bash
    hint: HISTSIZE

  3. #3
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,769

    Smile

    hi,
    i tried this.
    set history=2000
    but when i close the terminal,
    history limit reset to default 1000...i tried to look in bash man ....yet to find the soultion
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  4. $spacer_open
    $spacer_close
  5. #4
    Banned CodeRoot's Avatar
    Join Date
    Sep 2005
    Posts
    567
    Try placing a line in '~/.bashrc' that sets 'HISTSIZE' to 2000, and see if that works for you...

  6. #5
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,769

    Thumbs up

    how to set that i tried this .
    $HISTSIZE = 2000

    not working when i invoke terminal ,
    it says
    bash: 1000: command not found
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  7. #6
    Banned CodeRoot's Avatar
    Join Date
    Sep 2005
    Posts
    567
    Try:
    Code:
    HISTSIZE=2000
    (No space on either side of '='.)

  8. #7
    Linux Guru Lakshmipathi's Avatar
    Join Date
    Sep 2006
    Location
    3rd rock from sun - Often seen near moon
    Posts
    1,769

    Smile

    thanks codeRoot ...it works perfectly
    First they ignore you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
    -----
    FOSS India Award winning ext3fs Undelete tool www.giis.co.in. Online Linux Terminal http://www.webminal.org

  9. #8
    Banned CodeRoot's Avatar
    Join Date
    Sep 2005
    Posts
    567
    Quote Originally Posted by Lakshmipathi View Post
    thanks codeRoot ...it works perfectly
    "Very welcome... Glad you got it working for you..."

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •