Using An Alias

An alias is a pseudonym for a command, tool, utility, their options, arguments or combinations thereof. Aliases can be used to put a shorter typing handle on lengthy commands that one frequently uses.

When using an alias the command and not the alias will show up in your shell history. This is in contrast to a script which does show up on one’s shell history rather than the commands it is composed of. The scope of the alias is limited to the user that creates it where-as a script can be placed in the local bin so that anyone on the system can use it.

In short an alias can be used to call a command with arguments by a short name. I shall discuss the alias tool in the next few posts.

Posted in BSD, Bash, GNU/Linux, UNIX | Tagged , , , , | Leave a comment

How Long Has The Shell Been Running

SECONDS is the shell variable that records how many seconds a shell has been running.

Example…
See how many seconds the shell has been running…
$ echo $SECONDS

One can use the utility units to convert the output into hours, minutes, ect.

Posted in BSD, Bash, GNU/Linux, UNIX | Tagged , , , , | Leave a comment

Setting Your Path

To change your path open .bashrc in your home directory with a text editor and change the variable PATH.

Example…
The PATH variable in .bashrc is set to…
PATH=”/usr/bin:/bin:/usr/bin/X11:/usr/games”
and you want to add /home/oznola/bin.
Subsequently add the new directory to PATH like this..
PATH=”/usr/bin:/bin:/usr/bin/X11:/usr/games:/home/oznola/bin”

Posted in BSD, Bash, GNU/Linux, UNIX | Tagged , , , , | Leave a comment