Advanced use of history in some bash shell

Filippos Klironomos presariod at gmail.com
Fri May 12 17:14:00 UTC 2006


Do a 'man history' and you'll get everything under the sun you can tweak as
far as history is
concerned.

To increase the history size tweak the HISTSIZE, HISTFILESIZE variables.
To change the history file per new shell you can dynamically change
HISTFILE.
Say put a command to create a temporary file in one of the login scripts
(.bashrc):

export HISTFILE="$HOME/.bash_history_$$"

which appends the PID of the shell to the name, and then when you logout
merge the history file by putting in .bash_logout

history -w
cat $HISTFILE >> .bash_history

Now as far as the permissions are concered I am lacking imagination how to
do
that. I can't think how the same user can prevent himself from viewing one
of his
files just because a different shell created it.


Filippos

On 5/12/06, Ambrogio <fn050202 at flashnet.it> wrote:
>
> Hi all,
>
> I would like to have my shells to be compliant to those things.
>
> 1. A large number of slot for history so I don't lose command.
> 2. Each shell has proper history, so command issued in one shell are not
> viewed on others
> 3. But when shell is closed, commands are appended to history files, and
> not overwritten
>
> Is this possible?
> Where ca I act to change default behavior of shell history?
>
> Tnx to all
> Ambrogio
>
> --
> fedora-list mailing list
> fedora-list at redhat.com
> To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20060512/08e1eda8/attachment-0001.htm>


More information about the fedora-list mailing list