Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

nothin is getting saved in .history file

Status
Not open for further replies.

itsnammu

Programmer
Oct 16, 2003
14
IN
even though

history and savehist are set to 100
then also nothin is gettin saved in .history file
 
How are your trying to view .sh_history? It's not a regular file and does like being catted. Or do you mean you can't recall commands - in which case do you have set -o vi in your .profile? Is this ksh? Post back with more info.
 
What is the value of the variable $HISTFILE ?

Mine is set to /.sh_history

Mike

To err is human,
but to really foul things up -
you require a man Mike.

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
HISTFILE is undefined ...
what should i set it to. .

and i am not a root user so i dont have access to /.sh_history file

and i want to c my .history file but its empty

my question is y nothin is gettin saved in that file
thier r no issues regarding viewing the file, file size is '0'


 
Sorry, don't know the tsch shell, but a man on it should give you details of it's history capabilities. Have you tried Mike's suggestion, possibly export $HISTFILE=/.history in the .tcshrc (or whatever file is used on starting a shell). There is man information here:


if you do not have man available on your system. HTH.
 
when i write 'tcsh'
on the prompt
everything works perfectly fine .....
whats happening m not gettin ...please help ...
thanks in advance
 
When you first log in, what does echo $SHELL contain? What is the shell entry for the user in /etc/passwd?
 
echo $SHELL
-> /bin/tcsh

and entry in the passwd file is correct its ... /bin/tcsh

 
itsnammu,

Set the variable HISTFILE to the name of a file you can write to, something like ~/.history should be ok. (In your home directory in other words.)

Mike

To err is human,
but to really foul things up -
you require a man Mike.

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
i did that also ...but still nothin is gettin saved in that file ....wondering y
 
Ok [blush] I was barking up completely the wrong tree there.

This is like the C shell isn't it - not the Korn shell...

Your first post describes setting the variable correctly.

When are you checking the contents of the ~/.history file? It's supposed to only get written when you log out.

Mike

To err is human,
but to really foul things up -
you require a man Mike.

Want to get great answers to your Tek-Tips questions? Have a look at faq219-2884

 
i think thts not correct because i can see the history from other accounts ..
n wht u r talking is... when we want to save the commands even after we close the shell thn savehist no. of commands get saved in the .history file ....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top