1751858 Members
5825 Online
108782 Solutions
New Discussion юеВ

HISTFILE issues

 
Deborah Ellis_4
Occasional Contributor

HISTFILE issues

I noticed that whenever I log in as myself, home directory is nfs mounted, HISTFILE=/tmp/hist.pts_t4, is owned by another user and permission is denied for me to read this file. Any solution?
Try tolearn something new everyday
4 REPLIES 4
Victor BERRIDGE
Honored Contributor

Re: HISTFILE issues

Hi,
Looks like in the .profile of the user, the HISTFILE variable has as connexion pty as suffixe, as this chages after people log out the only solution I see is that in the .profile of the user, it removes the history file...
Else you modify your .profile ot use your defined HISTFILE...

Good luck

Victor
Bruce Regittko_1
Esteemed Contributor

Re: HISTFILE issues

Hi,

In your .profile file, place (or modify) the line

export HISTFILE=$HOME/.sh_history

The next time you log in, .sh_history in your home directory will store your previous commands.

--Bruce
www.stratech.com/training
Stefan Schulz
Honored Contributor

Re: HISTFILE issues

As your homedirectory is NFS mounted it is better to place the HISTFILE on a local drive. So i would reconmend to use

HISTFILE=/tmp/.sh_history.$LOGNAME

This places a userdependant history on the local drive. I learnd this two days ago!

Hope this helps, and please assign some points.

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Marcel Boon
Trusted Contributor

Re: HISTFILE issues

Hi,

Just some idea, are your userid on those machines differend ?

Marcel
See the man pages