Configuring history with variables


show more Configuring history with variables provides you with in-depth training on IT. Taught by Kevin Skoglund as part of the Unix for Mac OS X Users show less
please wait ...

Configuring history with variables

Environment variables can be very helpful in allowing us to customize how the Unix history works. There are five different variables that we can configure. Before we start looking at them, let's first start by just using history -c to clear out our existing history so that everything we work with we'll be able to easily identify what's new and what's been added to the history, and then let's do nano .bashrc and right below where we set our path I am just going to paste in the lines for the history and then we can talk to them and that way you don't have to sit and watch me type.

So notice that on each of them I'm exporting it and here is the variable name. HISTSIZE, HIST being short for history, HISTSIZE= and then a number. This is the number of commands that history will remember. By default it will remember 500. If you want more or less, well this is how you change it. You set the variable here. Once we get to that maximum number then the oldest command will...

Configuring history with variables
Video duration: 6m 17s 6h 35m Beginner

Viewers:

Configuring history with variables provides you with in-depth training on IT. Taught by Kevin Skoglund as part of the Unix for Mac OS X Users

Subject:
IT
Software:
Mac OS X Unix
Author:
please wait ...