Welcome to the Linux Foundation Forum!

Original file of "set history" command? [SOLVED]

linuxque Posts: 10
edited January 2012 in Command Line


Shell = csh

I have "set history=1000"

I need to check a command which I had executed more than couple of days ago, which has crossed 1000 history limit.

Can I find it?

Where actually it gets stored (for eg: bash = .bash_history)

And finally, what is the maximum number of history set path can be set in "C" shell




  • marc
    marc Posts: 647
    Unfortunately I'm afraid you can't get that command you executed.

    AFAIK, the file you are looking for is .history

    And about the limit... probably there isn't. Just notice that the file will grow and grow and continue to grow... ;)

  • @linuxque

    Where did you set the history count value?

    Not sure how far back you can go in the .bash_history file to find all your executed commands. The recent ones are always displayed.
  • Wonderful thread.

    Can someone let know where exactly these history entries are stored ?
    I mean the direct log - which the command 'histry' will fetch and show ?
    Thank you.
  • marc
    marc Posts: 647
    In bash by default it's ~/.bash_history

  • Thank you very much Marc. Sorry I forgot, oh yes yes, I remember now.

    Happy New Year !
  • Goineasy9
    Goineasy9 Posts: 1,114
    And remember, if your in the terminal, under settings --> Configure profile or Current profile, you can set scrolling to unlimited, so you never cut off when looking back.
  • @GoinEasy9:
    Thanks buddy, I can set in profile upto 1 followed by 5 zeros :) well that would be more than enough I believe.
    Thanks y'all, but still unable to find the file where the history is stored in 'C' shell.


  • marc
    marc Posts: 647
    (CSH only) History is in memory while executing. If you set the savehist variable, your history will be saved to ~/.history on logoff

  • Thank you Marc


Upcoming Training