Tuesday, 19 December 2017

How to change Timezone in Windows from Command Line

Guys, today let us learn how to change and/or update the Timezone on Windows machines without using the GUI i.e from the command line. On most flavors of Windows, the timezone utility (tzutil.exe) lies at C:\Windows\System32 location. 

Note : Updating timezone requires a user to have administrator rights. Make sure you have it.

So now, open the command line as administrator. Open the tzutil.exe from C:\Windows\System32 location. Let us look into a few illustrations on its usage.
  • To list current time zone :
C:\Windows\System32>tzutil.exe /g
Eastern Standard Time

  • To display the list of all available time zones :
C:\Windows\System32>tzutil.exe /l

(UTC+08:00) Irkutsk
North Asia East Standard Time

(UTC+08:00) Kuala Lumpur, Singapore
Singapore Standard Time

(UTC+08:00) Perth
W. Australia Standard Time

(UTC+08:00) Taipei
Taipei Standard Time

(UTC+08:00) Ulaanbaatar
Ulaanbaatar Standard Time

(UTC+08:30) Pyongyang
North Korea Standard Time

(UTC+08:45) Eucla
Aus Central W. Standard Time

(UTC+09:00) Chita
Transbaikal Standard Time

(UTC+09:00) Osaka, Sapporo, Tokyo
Tokyo Standard Time

(UTC+09:00) Seoul
Korea Standard Time

  • To update/set the time zone to a different time zone
C:\Windows\System32>tzutil.exe /s "Cen. Australia Standard Time"

So as you see there are basically only 3 switches to use /g /l and /s

Friday, 1 December 2017

Learn Deutsche - German nouns : Set 2

Guys in today's post we will look into another new fresh list of Deutsche words. Let's get started. Today's theme is Colors (die farben).

Set 2 (Colors / die farben - 11 words) :

Red : rot
Blue : blau
Yellow : gelb
Green : grün
Brown : braun
Black : schwarz
White : weiß
Gray : grau
Violet : violett
Purple : lila
Pink : rosa

Thursday, 30 November 2017

How to check system information on CentOS Linux from CLI

To check the system information of CentOS Linux from command line interface, the following commands will come in handy.

cat /proc/cpuinfo

processor       : 1
vendor_id       : GenuineIntel
cpu family      : 6
model           : 45
model name      : Intel(R) Xeon(R) CPU E5-4620 0 @ 2.20GHz
stepping        : 2
microcode       : 0x710
cpu MHz         : 2200.000
cache size      : 16384 KB
physical id     : 2
siblings        : 1
core id         : 0
cpu cores       : 1
apicid          : 2
initial apicid  : 2
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts mmx fxsr sse sse2 ss syscall nx rdtscp lm constant_tsc arch_perfmon pebs bts nopl xtopology tsc_reliable nonstop_tsc aperfmperf pni pclmulqdq ssse3 cx16 sse4_1 sse4_2 popcnt aes xsave avx hypervisor lahf_lm ida arat pln pts dtherm
bogomips        : 4400.00
clflush size    : 64
cache_alignment : 64
address sizes   : 40 bits physical, 48 bits virtual
power management:

To check the memory details use the following :

vmstat -s

 3883788 K total memory
      3758516 K used memory
      2232252 K active memory
      1263620 K inactive memory
       125272 K free memory
            0 K buffer memory
       259872 K swap cache
      8191996 K total swap
      3114568 K used swap
      5077428 K free swap
    411521845 non-nice user cpu ticks
        23449 nice user cpu ticks
    116773236 system cpu ticks
   5900085167 idle cpu ticks
      1174004 IO-wait cpu ticks
         1058 IRQ cpu ticks
      7376135 softirq cpu ticks
            0 stolen cpu ticks
    234643114 pages paged in
    380977726 pages paged out
      3875967 pages swapped in
      4295358 pages swapped out
    948364036 interrupts
   1524453860 CPU context switches
   1479654445 boot time
    130969946 forks

You could also use an alternative command :

cat /proc/meminfo

MemTotal:        3883788 kB
MemFree:          119860 kB
MemAvailable:      89684 kB
Buffers:               0 kB
Cached:            64528 kB
SwapCached:       455596 kB
Active:          2526176 kB
Inactive:         993336 kB
Active(anon):    2503132 kB
Inactive(anon):   954552 kB
Active(file):      23044 kB
Inactive(file):    38784 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:       8191996 kB
SwapFree:        4795948 kB
Dirty:                96 kB
Writeback:             0 kB

Listing repositories in CentOS Linux

In CentOS and Red Hat flavors of Linux, if we want to list all the configured repositories, we need to use the following command.

yum repolist

This will list information with columns like repo id, repo name, status.

Use the verbose mode with the -v switch for more detailed information.

yum -v repolist

For listing only enabled and/or disabled repositories, use the following syntax

yum repolist enabled


yum repolist disabled

For listing all of the repositories (i.e enabled and disabled), use :

yum repolist all

Now, from the list of of all configured repositories, if we want to disable/enable a specific repository, use the following :

yum-config-manager --disable test-repo-name.repo


yum-config-manager --enable test-repo-name.repo

Hope it helps guys. Ciao!

Execute Shell in Jenkins - Update Permissions Example

Hello guys. How's it going? In today's post, let us look into an example of how to execute a shell command in Jenkins.

For illustration, let us consider a Java based project which is under IBM Clearcase source control and built using Maven on a Linux machine. Now we want to execute a bash command to update the permissions of all pom.xml files (i.e Parent pom's and Child pom's).

Check a few sample commands for reference :

find $WORKSPACE/$CLEARCASE_VIEWNAME/PROJECT_SRC_CVOB/SRC -type f -name pom.xml -exec chmod 755 {} \;

find $WORKSPACE/$CLEARCASE_VIEWNAME/PROJECT_SRC_CVOB/SRC -type f -name pom.xml -exec chmod 444 {} \;

find $WORKSPACE/$CLEARCASE_VIEWNAME/PROJECT_SRC_CVOB/SRC -type f -name pom.xml -exec chmod 777 {} \;

Hope it helps. Ciao!

Tuesday, 28 November 2017

Learn Deutsche - German nouns : Set 1

Guys, in the past few posts, we looked into a few random word sets covering most commonly used Deutsche verbs. In this post, let us look into a new word-list of proper nouns used in our daily lives. We will also mention the gender of these words i.e der (Masculine) /die (Feminine) /das (Neutral). This should aid you in remembering the same. In today's set let us look into the most common words for office supplies/stationary.

Set 1 (Stationary / Office Supplies) - 12 words :

Pencil : der Bleistift
Pen : der Kuli
Eraser : der Radiergummi
Ruler : das Lineal
Notebook : das Heft
Dictionary : das Wörterbuch
Glue Stick : der Kleibstift
Scissors : die Schere
Ink : die Tinte
Paper : das Papier
Stapler : der Hefter
Picture : das Bild

Thursday, 23 November 2017

How to enforce specific JDK for a Maven build

As you maybe aware, the Maven enforcer plugin provides the option to enforce specific rules while building a project. For instance we could enforce a specific version of JDK to be used for a build.

For instance, let us enforce the usage of JDK 1.8.0. In that case, check the configuration of maven-enforcer-plugin in your main parent POM


Note the <requireJavaVersion> tag used for the same. For more information, check the following link as well.
Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker