Random Notes from My Research Life @ IISc

March 8, 2012

Enhancing Bash

Filed under: Linux — Sooraj K. Ambat @ 15:17
Tags: , ,

Use the following e lines in Bash init. (/etc/bash.bashrc in Ubuntu 11.10!)

export HISTCONTROL=erasedups 
export HISTSIZE=10000 
shopt -s histappend

The first line removes the duplicate commands saved in history (when a command is entered).
Second line sets history size to 1000 lines.
The third line makes sure that when you exit a bash shell, the history from that session is appended to ~/.bash_history. (By default this may not happen always especially when you are working on multiple shells!)


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: