Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

im logging into a particular ip using

ssh user@ip then i type in a few commands, then i exit and when i relogin and type history, all the previous commands are gone. Now i understand i have to export my history into a HISTFILE to store it. But only these two files are available for modification : .bashrc and .bash_profile for the given user. i exported HISTFILE in both files, yet i am not able to store history. the shell i am using for this user is KORN.

the output of ls -lrta in folder /home/user on the remote server:

$ ls -lrta
total 40
-rw-r--r--   1 GJMEHUL GJMEHUL  120 May 11 18:20 .gtkrc
-rw-r--r--   1 GJMEHUL GJMEHUL   24 May 11 18:20 .bash_logout
drwxr-xr-x  11 root    root    4096 May 22 16:05 ..
-rw-r--r--   1 GJMEHUL GJMEHUL  235 Jun 14 16:22 .bash_profile
-rw-------   1 GJMEHUL GJMEHUL  218 Jun 14 18:10 .sh_history
-rw-r--r--   1 GJMEHUL GJMEHUL  168 Jun 14 18:16 .bashrc
-rw-r--r--   1 GJMEHUL GJMEHUL  704 Jun 14 18:17 .zshrc
-rw-------   1 GJMEHUL GJMEHUL 3293 Jun 14 18:17 .viminfo
drwx------   2 GJMEHUL GJMEHUL 4096 Jun 14 18:17 .
share|improve this question
    
Which ksh? pdksh? –  Jiri Xichtkniha Jun 14 '12 at 13:56
add comment

1 Answer

A "normal" ksh uses /etc/profile and then $HOME/.profile - check if HISTFILE is unset in /etc/profile and/or create a $HOME/.profile and set it there.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.