Help answer threads with 0 replies.
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 07-21-2009, 11:02 AM   #1
LQ Newbie
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
Unique HISTFILEs for each ksh terminal open?

I'm running KDE and I'm using Konsole, which believe is a kshell. I usually have many terminals open at once and I'm trying to have my command line history be unique for each terminal open. I have tried adding this to my .profile:

HISTFILE=$HOME/.sh_history_$$;export HISTFILE

I tried using $PID and $PPID instead of $$ with no success. However, as you can probably guess, this is not working. It is creating a .sh_history for a PID but when I open a new Konsole tab it is still using the same history.

It seems I don't understand how PIDs work. When I do a "print $PPID" in the command line, the results are identical for all tabbed terminals, but they are different if I open a brand new Konsole by right clicking on the desktop. However, none of the PPIDs show up as a history file. I'm horribly confused.

Also, I realize that this could create many separate history files as time goes on; is there a way to delete a terminal's history file when closing it?

When I ran GNOME a while ago, command line histories were unique for each terminal and tab I had open. I don't know why it's different in KDE.

Thanks all.


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 open a new terminal kushkothari Programming 4 10-21-2008 03:33 AM
unique id code coupon? open source- strange record label raphihell Linux - Software 2 04-23-2008 11:09 AM
LXer: Startup Offers Unique Delivery Model For Open-Source Software LXer Syndicated Linux News 0 12-30-2005 03:31 AM
Quick Ksh Script to open a progie ']['HeBroken Programming 1 12-10-2004 07:27 AM
How to open programs in terminal without being stuck to the terminal?? brynjarh Linux - Newbie 6 07-07-2004 01:52 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:33 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
Open Source Consulting | Domain Registration