Find the answer to your Linux question:
Results 1 to 7 of 7
redhat 9. when i use the command # history, a list of all the commands run till date is shown. will it ever renew ? i mean to say, i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2005
    Location
    india
    Posts
    87

    the command # history


    redhat 9. when i use the command # history, a list of all the commands run till date is shown. will it ever renew ? i mean to say, i would like that all the commands run till date should remain in history. it should not vanish one fine day as log files do. where exactly is the configuration file for # history, where i can set configurations for history ? Thanx

  2. #2
    Linux Newbie
    Join Date
    Jul 2004
    Location
    Calcutta, India
    Posts
    220
    the environment variables HISTSIZE and HISTFILE normally determines your history sizes and files. Try printing them on your console by :
    Code:
    echo $HISTFILE && echo $HISTSIZE
    The history file is normally ~/.bash_history, if you are using BASH ie.

  3. #3
    Just Joined!
    Join Date
    Mar 2005
    Location
    india
    Posts
    87

    hiiiiiiiiii

    hi Prosenjit, thanx for ur reply. It was indeed helpful. The file is at /root/.bash_history. The default history size is 1000. I want to increase that to 10000. How can it b done ? bye

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru budman7's Avatar
    Join Date
    Oct 2004
    Location
    Knee deep in Grand Rapids, Michigan
    Posts
    3,242
    Use a text editor like nano.
    Code:
    nano -w filename
    Do whatever you want, like add a 0
    Then hit CTRL x and y and ENTER
    That is it.
    How to know if you are a geek.
    when you respond to "get a life!" with "what's the URL?"
    - Birger

    New users read The FAQ

  6. #5
    Linux Newbie
    Join Date
    Jul 2004
    Location
    Calcutta, India
    Posts
    220
    Since you are a system admin and you do everything as root, you can change the global bash profile, which is /etc/profile .
    I am quoting a portion of mine :
    Code:
    USER="`id -un`"
    LOGNAME=$USER
    MAIL="/var/spool/mail/$USER"
    
    HOSTNAME=`/bin/hostname`
    HISTSIZE=1000
    
    if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
        INPUTRC=/etc/inputrc
    fi
    just change the line starting with HISTSIZE to suit your needs .

    Btw .. I was just curious, why do you need such a huge history size, you are never gonna use it anyway, if you are thinking that it is the total history size of all the users then it is NOT so. HISTSIZE=1000 means each single user will have separate history of size 1000 by default. And as a system admin, if you wanna see wht other users are doing in your system, u can always use the last command.
    Code:
    # last <username>

  7. #6
    Just Joined!
    Join Date
    Mar 2005
    Location
    india
    Posts
    87
    hi prosenjit ,
    thatswhat exactly i was looking for !!!!! I wanted just for a precautionary measure. In my scenario, all other users r in windows xp. redhat is only the server meant for routing, NAT, caching only name server. i am also planning to implement web server by running apache, tomcat, postgres SQL. Apache & tomcat r over. Postgres is bit troubling. Do u have any idea regarding mail server configuration ??? i just want a brief step by step procedure to configure a mail server . can u pliz help me out ??? google is there. but so much of doc / tutorial pages only confuses me . As such i am so busy , i donot find time to read all that stuff. If i get a brief idea, then i can read all those docs. thanx buddy....

  8. #7
    Linux Newbie
    Join Date
    Jul 2004
    Location
    Calcutta, India
    Posts
    220
    A-ha !!! I guessed so ..., thr cud have been only this reason why you were so interested in increasing your history size.
    Anyway, for your mail server, if you are talking about sendmail, then may I offer you this link : ( i actually saved this page offline, but thr isnt much scope for me to put up a mail server in my LAN environment, so I have NOT
    yet been able to set up a mail server. But this site has really really good tutorials on server config, bcos its from here tht I got my vsftpd configured. And well, shud I say, its one of the best config I have seen. )
    The link is : http://www.linuxhomenetworking.com/l...n/sendmail.htm

    Btw, thanx for adding me to your msngr list, I guess you know much about me from my website, but could you tell me more about yourself please ?? That is, if you DONT mind. I didnt get much info from either ur profile here or at yahoo. Just send me an offline in the messenger, no need to post here.
    Byee ... and Best'o'Luck for your mail server.

Posting Permissions

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