Git is a versatile tool to do version control of project code. We can develop code with slight modifications using branches in GIT. Sometimes we require to compare two branches to see what difference in that two branches. In this post, we will see how to see a difference between two branches in a different way. Example1: Show all the files which are different between two branches. git diff --name-only branch_1..branch_2 Or git diff --name-only branch_1 branch_2 Example: git diff --name-only bug/fix_gcc_compiler...feature/test-12430 .kitchen.vagrant.yml .kitchen.yml Berksfile CHANGELOG.md attributes/default.rb files/default/nonprod_pvm_ca_cert files/default/prod_pvm_ca_cert metadata.rb recipes/cleanup.rb recipes/configure.rb recipes/install.rb recipes/install_v4.rb recipes/install_v4_audit.rb spec/unit/recipes/cleanup_spec.rb spec/unit/recipes/configure_spec.rb spec/unit/recipes/install_spec.rb spec/wbc_nix_protectv_test/default_spec.rb This will list all the files which have difference instead of showing content. Example2: To see the difference of file content from different branches use below command git diff mybranch master — myfile.cs Example: git diff feature/test-23438 master -- metadata.rb diff --git a/metadata.rb b/metadata.rb index b373613..a794431 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ maintainer_email 'email@example.com' license 'all_rights' description 'Installs/Configures www_linuxnix_protectv' long_description 'Installs/Configures www_linuxnix_protectv' -version '1.1.1' +version '1.1.0' chef_version '>= 12.5' if respond_to?(:chef_version) supports 'redhat' Example3: Get the difference between two branches. git diff branch_1..branch_2 Example: git diff feature/test-23438...Read More
Author: Surendra Anne
We are excited to announce our online training from this weekend. These trainings are in-person and online based through GoToMeeting software. The first training which is we are planning to give is “Bash shell scripting” for beginners. If you want to start coding for your system administration activities, then this course is for you. We will teach basics with some detailed explanation about each concept. Please find below curriculum on what we teach in this class. Please register for your self to join first two sessions for free of cost here: “Online shell scripting training” or fill below embedded form. Training Date and time: 10th Feb 2018, that is this Saturday and 8.30AM IST. Introductory Fee: $50. From next batch, the fee will be $100. Loading… About the trainer: Surendra Kumar Anne, Sr. Devops engineer. Content of course Basics of Unix/Linux (For nonsystem admins) History of Unix/Linux Flavors of Linux Linux Architecture Linux prompt and CLI Unix file systems(Directory structure) Shell scripting basics What is shell scripting? Why write a shell script? How to write shell scripts? Metadata in shell scripts Code in shell scripting Comments Executing shell script Debugging shell scripts Printing and Reading echo printf Read Redirection operators Input and output Redirection( <, > ) Input and output append redirection ( <<, >>) STDOUT/STDERR redirection(1, 2) /dev/null Variables and Arrays User-defined scalar variables or Strings System-defined scalar variables...Read More
The iostat command stands for input-output statistics. This command is used to generate input-output statistics for device, partitions the network file system, generate the report for Central Processing Unit (CPU). When the system booted, iostat command generates the first report. Each report follows the same time as the previous one. These report followed by the CPU statistics. When you consider a multi-processor system, the CPU statistics are calculated by average all processor. Each interval parameter takes to generate the report in seconds; we can specify ‘count’ parameter the junction point of each interval parameter. Before using the iostat command, you need to install Sysstat package. Sysstat package help to configure iostat command and you need to check the latest version of iostat are available on your system or not. Sysstat store different type of commands like 1) sar command 2) sadc 3) a1 4) sa2 5) iostat 6) mpstat etc. Syntax for iostat command $iostat <options> <device name> 1.Cpu and Device utilization statistics: In this article, if you only display the information about CPU usage, input-output statistics, then use the simple iostat command. The syntax is given below: $iostat Example 1: [linuxnix@fedori ~]$iostat Linux 126.96.36.199-106.fc14.i686 (fedori) 07/19/2016 _i686_ (1 CPU) avg-cpu: %user %nice %system %iowait %steal %idle 6.38 9.74 10.47 1.86 0.00 71.55 Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn sda 7.67 23.85 64.13 989350866 2659823200 sdc 0.00 0.00...Read More
Take this course
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.