Hi All,

To help you search your bash_history.
Increase your bash_history save size by adding the following
to your .bashrc

$ gedit .bashrc

export HISTSIZE=1000000 HISTFILESIZE=1000000

At the bottom of the file in the alias section add:

alias h="history|grep "

now run: ". .bashrc" without the quotes
(to save you having to log out & back in to your desktop)
Then you can search your bash_history with:

$ h sudo
$ h install
$ h remove
$ h gedit

etc.,

Ref .bashrc
http://paste.ubuntu.com/137987/

$ cp .bash_history bh090326.txt

$ grep sudo bh090326.txt
$ grep cp bh090326.txt
$ grep install bh090326.txt
$ grep remove bh090326.txt

$ h grep

$ cp bh090321.txt /media/data/backups/

grep & find inside many files in a directory.

If you have a directory with many files inside and you
want to search for a string in all the files inside. e.g.
I keep a directory with all my .bash_history backups then:

cd /media/data/backups/

$ grep install *
$ grep remove *
$ grep sudo

etc.,

When testing these tools can save a great deal of time.
The new install can be quickly configured to your preferences,
and build-software\favourite software reinstalled without fuss.
Today's .bash_history is tomorrows install routine.

Cheers!
Dave.

http://www.64studio.com/node/1028
http://trac.64studio.com/64studio/timeline



_______________________________________________
64studio-devel mailing list
[email protected]
http://lists.64studio.com/mailman/listinfo/64studio-devel

Reply via email to