Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-08-2009, 10:47 AM   #1
Registered: Nov 2007
Distribution: CentOS 6
Posts: 189

Rep: Reputation: 22
-bash: HISTSIZE: readonly variable -bash: HISTFILESIZE: readonly variable

On one of my servers I see this when I log in. What does this mean and how can I get it to go away? Everything seems to work fine, but none of my other machines give this error.

-bash: HISTSIZE: readonly variable
-bash: HISTSIZE: readonly variable
-bash: HISTFILESIZE: readonly variable
Old 12-08-2009, 11:51 AM   #2
Registered: Sep 2009
Location: Russia
Distribution: Gentoo, LFS
Posts: 399
Blog Entries: 71

Rep: Reputation: 65
weird. paste ~/.bashrc
Old 12-08-2009, 11:57 AM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,041
Blog Entries: 11

Rep: Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907
and maybe
and grep for HIST through /etc/profile.d/
Old 12-08-2009, 12:01 PM   #4
LQ 5k Club
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian except for netbook still on Slackware 13.37 (and I have to support Ubuntu)
Posts: 8,572
Blog Entries: 30

Rep: Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182Reputation: 1182
Please post the contents of any of these files that exist:
  • /etc/profile
  • ~/.bash_profile
  • ~/.bash_login
  • ~/.profile
  • ~/.bashrc
Old 12-08-2009, 12:51 PM   #5
Registered: Nov 2007
Distribution: CentOS 6
Posts: 189

Original Poster
Rep: Reputation: 22
Well it is my /etc/profile but I'm still confused. This exact /etc/profile is on all my machines, but I only get the error for one particular machine.

# /etc/profile
# System wide environment and startup programs
# Functions and aliases go in /etc/bashrc

# Set Prompt
export PS1="[\u@\h \W]\\$ "

# Set up $PATH properly
if [ `id -u` -eq 0 ]; then
export PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin"
export PATH="/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/wp8/wpbin:/usr/local/Office51/bin:/usr/local/saord/bin.linux"

# Default variables
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
export TMOUT=86400
ulimit -c 1000000

export iraf=/iraf/iraf/
export IRAFARCH=redhat

if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
umask 022
umask 022

export USER=`id -un`
export MAIL="/var/spool/mail/$USER"
export HOSTNAME=`/bin/hostname`

######## set specific shell behavior -- Added by RPD, June 10, 2004
# shopt -s checkwinsize cmdhist histappend
export HISTFILE=~/.bash_history
export HISTSIZE=1000
export HISTFILESIZE=20000

readonly HISTFILE
readonly HISTSIZE

# XMMS skins
if [ ! -d /usr/share/xmms/Skins ] && [ -x /usr/bin/xmms ]; then
export SKINSDIR=/usr/local/share/xmms_skins

# Source profiles
for i in /etc/profile.d/*.sh ; do
if [ -x $i ]; then
. $i
unset i

# Set the monitors to turn off after a certain time
if [ "$TERM" = "xterm" ] ; then
/usr/X11R6/bin/xset dpms 600 1800 3600 &> /dev/null


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get variable from text file into Bash variable mcdef Linux - Software 2 06-10-2009 01:15 PM
Problem with bash script - variable name within variable name steven.c.banks Linux - Newbie 3 03-10-2009 03:08 AM
BASH: instad of echo-ing, I just want to assing to a bash variable... how?? rylan76 Linux - Newbie 9 11-28-2008 08:46 AM
How to remove readonly variable? hocheetiong Linux - Newbie 1 04-21-2008 04:04 PM
unset a readonly variable hamster Linux - General 2 05-19-2003 05:13 PM

All times are GMT -5. The time now is 10:56 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration