Author: Sahil Suri

Maintaining your bash command line history in Linux

Introduction Every system administrator is a frequent user of the bash history command to recall previously executed actions. We frequently use the bash shells’ history feature to check what commands we executed previously on the system and also re-execute some of the commands if required. This often results in a lot of time being saved as we don’t have to retype lengthy commands on the terminal. We can just recall them from the shell history if we had used them earlier. We’ve already shared two posts earlier on the bash shell history namely bash history capabilities and replace occurrences of words in last command in bash history . In this article, we’ll show you how can use a few shell environment variables to make your bash shell history become very efficient. Before we get to discussing the environment variables, we would like to mention how you could view only particular count of commands from the entire command line history. You could pipe the output of the history command to the head and/or tail commands if you are interested in only a subset of the complete output. Or you can use the history command followed by the number of commands you’d like to see. Note that this number will be in descending order from the most recently executed command. For example, to view the last 50 commands in history, type: history 50 The...

Read More

GIT initial configuration setup

Introduction In our earlier articles on using the GIT version control system, we’ve shown you how to set or change default user name and email and how to set or change the default editor. In this article, we will share some parameters that you may consider setting in your git configuration and we’ll also talk about the hierarchy of the levels of git configuration settings. To learn how to install git on a Linux system, please do take a look at our article on how to install git on Centos where we’ve covered how to install the git version control system via yum/rpm and also how to install it from source.   Levels of git configuration There are 3 levels of git config; project, global and system. project: Project configs are only available for the current project and stored in .git/config in the project’s directory. To access the project or repository level git configuration, we execute the ‘git config’ command from within the project directory. global: Global configs are available for all projects for the current user and stored in ~/.gitconfig. To access the global git configuration, we use the ‘git config –global’ command. system: System configs are available for all the users/projects and stored in /etc/gitconfig. To access the system git configuration, we use the ‘git config –system’ command. After understanding the three levels of git configuration, we’ll now show you how to...

Read More

What is GIT and how to install it on Centos

Introduction A version control system is a piece of software that records changes to a file or set of files over time so that you can recall specific versions of these files at a later date. The need for version control is not limited to developers in today’s complex and mission-critical infrastructure environments. System administrators too can make efficient use of version control to track changes in their scripts and/or place different configuration files under version control. GIT is a powerful distributed version control system, perhaps the most powerful and feature-rich version control system available as of this writing. We’ve already briefly talked about the need for version control for system administrators and in this article, we will talk about how GIT came into existence and how to install it on a centos system.   History of GIT GIT was created by Linus Torvalds in 2005. It is written in Perl and C. The GIT project was essentially started as a substitute version control system for the Linux Kernel after BitKeeper withdrew its support. This project has since become immensely popular among since the emergence of the devops movement and framework and continues to increase its popularity.   GIT Design goals: Speed Simplicity Strong branch/merge support Distributed Scales well for large projects We mentioned in our introduction that GIT is a distributed version control system. Given below are the...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.