Tech Trivia #3: System beeps and command history

Posted: April 14, 2009 in OS, trivia
Tags: , ,

1. System beeps: Sick of those system beeps.Well then tell them to shut up.Here is the command. Type in the command setterm -blength 0 in the terminal.You will no longer hear a beep in that session. If you dont want to type it all the time, then add it to the system startup as mentioned in trivia#2. Have some peace of mind.

2.Command History: As you all know command history is a handy tool when using a terminal. But sometimes you will notice that the command u are looking for is already gone from the history.Well, to avoid it, you better set the size of the history archive by putting the following in the .bashrc file:

HISTSIZE=999

HISTFILESIZE=999

Oh,if that looks like a too big archive to search for a command,then u can always make use of grep. The command will be like:

history | grep -i str

where str is a part of the command u are looking for. So no more forgotten commands in your life.

PS: You can unset the value of HISTSIZE and HISTFILESIZE to permenantly keep a history of all commands ever used, but its not recommended for obvious reasons.

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s