1. bash history customizing
forgive me if this has been asked before, im a newbie to this
newsgroup, and a google search couldnt find me exactly what im looking
I really like my bash history facility, so much so that i have about
the maximum size set to 50000 and my HISTIGNORE list is rather large.
I found a way to stop history from remembering duplicate commands
(HISTCONTROL=ignoredups), which helps, but I want it to go further.
For one thing, I would like to prevent invalid commands from being
saved in my history. (not terminated commands, if possible, just
invalid ones, i.e. "cd $HOMEE" or "emax afile.txt")
Does anyone know of a good way to do this?
I also want to eliminate all duplicate commands in my history file,
but I want to keep the most recent duplicate only.
In other words if my history contains this...
1 cd $HOME
2 vi somefile.txt
3 cp somefile anotherfile
5 cd $HOME
6 vi somefile
I would like it to become
1 cp somefile anotherfile
2 cd $HOME
3 vi somefile
This way, over time most of my useful, regularly used commands would
rise to the top, while the useless ones would sift to the bottom of
the list. (for eventual manual purging?)
The obvious way is via a sort -u, but this sorts alphabetically which
is totally not what I want.
The only way I can thionk of doing this is via a regularly run script,
is ther a better way of doing it?
Surely im not the only one who has thought of this before...
2. Solaris in.ftpd and directory group sticky bit inheritance
3. Process history under C-shell and Bourne shell
4. CERN 3.0: Any cache logs ?
5. Customized installation with customized comps file...
6. How to configure my Windows keys in Gnome v1.4?
7. Flushing history to .history prior to logout?
8. Iomega ZIP-Drive
9. bash history -s appends to the previous history
10. source code for the history mechanism that is provided by the csh command shell
11. BORN Shell history
12. How to edit the history file in Korn Shell
13. Date stamping commands in the shell command history file