Wednesday, November 18, 2015

VScode is open source now

Visual Studio code (VScode) is the cross-platform Chromium-based code editor is being open sourced today by Microsoft. You can install in Linux also.

Monday, November 16, 2015

Simple shell script to find out MAC address in Linux

Find the following commands for the stuff
#cat /sys/class/net/*/address
For particular interface like for eth0
#cat /sys/class/net/eth0/address

Sunday, September 27, 2015

Installing only security updates in Ubuntu

Use the command unattended-upgrade possibly with the following syntax

#sudo apt-get install unattended-upgrades

Refer this up as well. /usr/share/doc/unattended-upgrades/

Monday, July 20, 2015

Terminal fix - desirable output

Use if clear does not work or the terminal does not show the output in the screen in a clear manner use this following command to fix this.

TERM=vt100; export $TERM

Wednesday, June 17, 2015

NTP leap second fix - Red Hat stuff

Resolve Leap Second Issues in Red Hat Enterprise Linux

Leap seconds are a periodic one-second adjustment of Coordinated Universal Time(UTC) in order to keep a system's time of day close to the mean solar time. However, the Earth's rotation speed varies in response to climatic and geological events, and due to this, UTC leap seconds are irregularly spaced and unpredictable. This article seeks to provide information regarding the leap seconds themselves, along with addressing how Red Hat Enterprise Linux handles the insertion of one.

The next leap second insertion is scheduled for June 30th, 2015 at 23:59:60 UTC.

Systems running any version of Red Hat Enterprise Linux should automatically account for leap second corrections if they are using the NTP (Network Time Protocol) daemon to synchronize their local timekeeping with an NTP server. During the last day before a leap second correction, NTP servers should notify their clients that a leap second will occur, and at 23:59:59 UTC, the Linux kernel should add or remove an extra second by making the 60th second occur twice or removing it entirely.

Tuesday, May 26, 2015

Delete the file and checking the error status - shellscript

This script uses command line arguments ($1 and  $?) and tail out the /root/error.txt file.

#usage of command line arguments
rm $1 2>>/root/error.txt
if [ $? -eq 0 ]
echo " Success "
tail -1 /root/error.txt

Sleep command - an example shell script

The following script clear screen and update the date every second. So it seems like the running digital clock.

#running digital clock
while [ : ]
sleep 1