Re: bash history

2012-04-30 Thread suvayu ali
Hi, On Mon, Apr 30, 2012 at 16:45, wrote: > I have: > HISTIGNORE='ls:cp:mv:rmdir:mkdir:less:most:joe:cd' && export HISTIGNORE > in my .bashrc. Works afaict. I think someone else pointed this out earlier in the thread, HISTIGNORE is the wrong variable for what the OP wants to achieve. The correc

Re: bash history

2012-04-30 Thread ny6p01
On Sat, Apr 28, 2012 at 03:38:41PM -0600, Peter Gueckel wrote: > I read about a shell variable called HISTIGNORE that is supposed to prevent > duplicate > commands from occurring in .bash_history. > > I put the following line into ~/.bash_profile: > > export HISTIGNORE="&" > > It's not working

Re: bash history

2012-04-28 Thread g
On 04/29/2012 12:15 AM, g wrote: <> > HISTCONTROL="ignoredupes" > > export HISTCONTROL > > wfm ;) after some post post thinking, i recalled that i did try "ignoreboth", but with out results and dropped to "ignoredupes" only. in addition, here is info from gnu .org: from the gnu 'bash ref

Re: bash history

2012-04-28 Thread Peter Gueckel
Ed Greshko wrote: > On 04/29/2012 09:14 AM, Peter Gueckel wrote: >> I'm thinking you have to start with an empty file. As was said in a >> former post, it doesn't work retroactively. > > I wouldn't have expected it to work retroactively. Everyone knows "You > can't rewrite > history". :-) :-) >

Re: bash history

2012-04-28 Thread Peter Gueckel
Andy Blanchard wrote: > It works, but not retrospectively. If you try running one of the > duplicated commands, it will strip out all of the duplicate entries then. > You'll also need to run "history -w" to update the history file, otherwise > it won't get updated until you exit the shell. Thank

Re: bash history

2012-04-28 Thread Ed Greshko
On 04/29/2012 09:14 AM, Peter Gueckel wrote: > I'm thinking you have to start with an empty file. As was said in a former > post, it > doesn't work retroactively. I wouldn't have expected it to work retroactively. Everyone knows "You can't rewrite history". :-) :-) -- Never be afraid to lau

Re: bash history

2012-04-28 Thread Peter Gueckel
Ed Greshko wrote: > On 04/29/2012 07:44 AM, Peter Gueckel wrote: >> Andy Blanchard wrote: >> >>> What you want is: >>> >>>export HISTCONTROL=erasedups >> It looked promising, but it doesn't work. I logged out and back in twice, >> then even completely turned off the computer and back on again,

Re: bash history

2012-04-28 Thread Joe Zeff
On 04/28/2012 04:44 PM, Peter Gueckel wrote: It looked promising, but it doesn't work. I logged out and back in twice, then even completely turned off the computer and back on again, but when I examine the .bash_history file, it is riddled with duplicate commands. It might only prevent new dup

Re: bash history

2012-04-28 Thread Edward M
On 04/28/2012 04:44 PM, Peter Gueckel wrote: Andy Blanchard wrote: What you want is: export HISTCONTROL=erasedups It looked promising, but it doesn't work. I logged out and back in twice, then even completely turned off the computer and back on again, but when I examine the .bash_history

Re: bash history

2012-04-28 Thread g
On 04/28/2012 09:38 PM, Peter Gueckel wrote: > I read about a shell variable called HISTIGNORE that is supposed to prevent > duplicate> commands from occurring in .bash_history. > > I put the following line into ~/.bash_profile: > > export HISTIGNORE="&" > > It's not working. -=- what made yo

Re: bash history

2012-04-28 Thread Andy Blanchard
On 29 April 2012 00:44, Peter Gueckel wrote: > It looked promising, but it doesn't work. I logged out and back in twice, > then even > completely turned off the computer and back on again, but when I examine > the > .bash_history file, it is riddled with duplicate commands. It works, but not re

Re: bash history

2012-04-28 Thread Ed Greshko
On 04/29/2012 07:44 AM, Peter Gueckel wrote: > Andy Blanchard wrote: > >> What you want is: >> >>export HISTCONTROL=erasedups > It looked promising, but it doesn't work. I logged out and back in twice, > then even > completely turned off the computer and back on again, but when I examine the

Re: bash history

2012-04-28 Thread Peter Gueckel
Andy Blanchard wrote: > What you want is: > >export HISTCONTROL=erasedups It looked promising, but it doesn't work. I logged out and back in twice, then even completely turned off the computer and back on again, but when I examine the .bash_history file, it is riddled with duplicate comma

Re: bash history

2012-04-28 Thread Ed Greshko
On 04/29/2012 06:15 AM, Peter Gueckel wrote: > Andy Blanchard wrote: > >> HISTIGNORE only deals with consecutive duplicates, IIRC. >> >> What you want is: >> >>export HISTCONTROL=erasedups >> >> you might also want to add ":ignorespace" to the end of that. That will >> cause any command prefix

Re: bash history

2012-04-28 Thread Peter Gueckel
Andy Blanchard wrote: > HISTIGNORE only deals with consecutive duplicates, IIRC. > > What you want is: > >export HISTCONTROL=erasedups > > you might also want to add ":ignorespace" to the end of that. That will > cause any command prefixed by a space to be ignored as well - very useful > f

Re: bash history

2012-04-28 Thread Andy Blanchard
On 28 April 2012 22:38, Peter Gueckel wrote: > I read about a shell variable called HISTIGNORE that is supposed to > prevent duplicate > commands from occurring in .bash_history. > > I put the following line into ~/.bash_profile: > > export HISTIGNORE="&" > > It's not working. I still have duplic

Re: bash history

2012-04-28 Thread inode0
On Sat, Apr 28, 2012 at 4:38 PM, Peter Gueckel wrote: > I read about a shell variable called HISTIGNORE that is supposed to prevent > duplicate > commands from occurring in .bash_history. > > I put the following line into ~/.bash_profile: > > export HISTIGNORE="&" > > It's not working. I still ha

bash history

2012-04-28 Thread Peter Gueckel
I read about a shell variable called HISTIGNORE that is supposed to prevent duplicate commands from occurring in .bash_history. I put the following line into ~/.bash_profile: export HISTIGNORE="&" It's not working. I still have duplicate commands galore. Why isn't is working? -- users mailin

Re: Bash History How to?

2010-06-02 Thread Bill Davidsen
Frank Murphy wrote: > I would like to prevent .bash_history being > created for root. > > And when "sudo" invoked by user. > > Have tried: > export HISTCONTROL=ignoreboth > > but nothing seems to be added to .bashrc > > this has come abote as I seem to have > /tmp/.bash_history > which may not

Re: Bash History How to?

2010-06-01 Thread Patrick O'Callaghan
On Tue, 2010-06-01 at 12:17 +0100, Frank Murphy wrote: > I would like to prevent .bash_history being > created for root. Maybe create the .bash_history file as non-writable? Just a thought. poc -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: ht

Re: Bash History How to?

2010-06-01 Thread Jorge Fábregas
On Tuesday 01 June 2010 07:17:13 Frank Murphy wrote: > I would like to prevent .bash_history being > created for root. unset HISTFILE works for me on /root/.bashrc HTH, Jorge -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscription options: https://admin.fedorapr

Bash History How to?

2010-06-01 Thread Frank Murphy
I would like to prevent .bash_history being created for root. And when "sudo" invoked by user. Have tried: export HISTCONTROL=ignoreboth but nothing seems to be added to .bashrc this has come abote as I seem to have /tmp/.bash_history which may not be good :( -- Regards, Frank Murphy UTF_8 E