Command history in Solaris


 
Thread Tools Search this Thread
Operating Systems Solaris Command history in Solaris
# 1  
Old 01-13-2007
Command history in Solaris

Can someone tell me what I can do to maintain a single history file ?

As it is it creates a new file for each session.

>ls -a .sh_*
.sh_history.10106 .sh_history.15240 .sh_history.21635 .sh_history.4291
.sh_history.11311 .sh_history.16593 .sh_history.23709 .sh_history.4661
.sh_history.11604 .sh_history.1687 .sh_history.239 .sh_history.6510
.sh_history.11931 .sh_history.17887 .sh_history.26844 .sh_history.8126
.sh_history.1209 .sh_history.18415 .sh_history.27278 .sh_history.8438
.sh_history.12888 .sh_history.19158 .sh_history.28077 .sh_history.9651
.sh_history.13553 .sh_history.19967 .sh_history.28602


I would like it to only keep one file and set the history command count to 100.
Meaning to keep the previous 100 commands. Is that doable is solaris. I know it works in HP.

Thanks in advance.
# 2  
Old 01-14-2007
Please post some more info so folks have a better chance at helping you. Run these commands and post the output:
echo $SHELL
grep -i hist .profile
grep -i hist /etc/profile
# 3  
Old 01-16-2007
Additional info

>echo $SHELL
/bin/ksh

>grep -i hist .profile
HISTSIZE=128
export HISTSIZE

>grep -i hist /etc/profile
HISTFILE=$HOME/.sh_history.$$
export HISTFILE
### History Commands ###
HISTSIZE=200
export HISTSIZE
# 4  
Old 01-16-2007
Quote:
Originally Posted by jxh461
HISTFILE=$HOME/.sh_history.$$

It seems it's working they way it is becasue you have it configured that way. One per shell pid.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Solaris History

why in solaris 10 I do not get history when I have the role as root? computer.root > history I get history:not found I am in computer.root > echo $SHELL /bin/sh computer.root > how can I see roots history in the sh shell? but in other shells I can only see my... (6 Replies)
Discussion started by: goya
6 Replies

2. Solaris

View 30 days history of freemem Solaris 10

I need to bump up the memory allocated to an Oracle database running on Solaris 10. While I see there is currently plenty of free memory to spare, how do I view the history of free memory on Solaris over the last month? What is the exact command? ---------- Post updated at 02:55 PM ----------... (0 Replies)
Discussion started by: mimimiami
0 Replies

3. UNIX for Dummies Questions & Answers

The history command: See other users command history

Can anyone tell this: If two users are logged into the same server from different locations. Is there a way to see the history command of the other user? I tried the history command, but it is showing me only the commands I used. Thanks in advance for your help. Iamnew2solaris (1 Reply)
Discussion started by: iamnew2solaris
1 Replies

4. Solaris

solaris 10 reboot history

Dears Kindly am requested to collect the date histroy that the system was rebooted, so is there any log file or command that i can find the time that the system was rebooted? thanks a lot for you kind support. (2 Replies)
Discussion started by: thehero
2 Replies

5. UNIX for Advanced & Expert Users

history timestamp in Solaris

Anyone knows how to display timestamp in Solaris since "HISTIMEFORMAT" variable is not supported in ksh ? (2 Replies)
Discussion started by: linuxgeek
2 Replies

6. UNIX for Advanced & Expert Users

Solaris shutdown and boot history

Hello. I'm trying to get a Solaris (SunOS 5.10) shutdown and boot history. Unfortunately the /var/adm/wtmpx file does not cover the period I want to trace. It's been reset. Therefore the command, "last" (or "last reboot") does not reach back far enough. Additionally the /var/adm/messages*... (4 Replies)
Discussion started by: etlpkby
4 Replies

7. UNIX for Dummies Questions & Answers

vi command history

How do you look at the whole list of previous commands you have used in VI? I know you can use the up and down arrows, but I know there's a way to see the full list. (5 Replies)
Discussion started by: cokedude
5 Replies

8. Solaris

How to set history key in Solaris

Hi Solaris guys, I just have my solaris 10 setup on x86 old box... How can i get history key? eg. Linux using up/down arrow key to call history command... HPUX using Esc-k How can i do the samething in Solaris? Thanks in advanced! Regards, gary (3 Replies)
Discussion started by: timontt
3 Replies

9. Solaris

solaris 10 vi history

i got solaris 10 DVD and i install it on intel 64. how do i set history to vi for command line? i can use backup space as well, it goes with "^H". this won't work, export EDITOR=vi, it response with not an identifier. thanks itik (4 Replies)
Discussion started by: itik
4 Replies

10. Solaris

Passwd History in Solaris 8

How to set passwd history feature in Solaris 8 to stop users from using their old passwords? (4 Replies)
Discussion started by: amoorti
4 Replies
Login or Register to Ask a Question