Category: Linux

Interesting data center technical tips / tasks / articles which we come across

How to replace text inplace without opening it, using sed

I have always loved range of text searching and editing tools in Linux. Be it grep to search for various patterns in a file. Or awk to print parts of a file in required format. Or the general purpose vi editor. Or the stream editor sed. Am writing this post to highlight just one feature…
Read more

November 8, 2017 0

Scan newly added disks or rescan resized disk in Linux VM

How do we rescan for new disks after adding a VMDK to a Linux Virtual Machine? First, list all disks available in the VM sudo fdisk -l Running the following command will scan for new scsi disks. sudo echo “- – -” > /sys/class/scsi_host/host0/scan .. .. sudo echo “- – -” > /sys/class/scsi_host/hostN/scan Run this…
Read more

November 1, 2017 0

How to find architecture of a Linux OS (32 bit or 64 bit)

I have been using getconf to find architecture of a linux os (32 bit or 64 bit) for a quite some time. But today, I came to know that there are several other ways to check this too. This is what I have been using: []# getconf LONG_BIT 64   Other options are: []# arch…
Read more

August 2, 2014 0

Troubleshooting Auto_ethX issues

With multiple NICs installed, udev would sometimes change order in which they were named. This leads to inconsistent network interface name between reboots. And NetworkManager also creates problems by renaming the interface to Auto_ethX. Ex: auto_eth0 Sometimes, we see that a device is continuously named wrongly or does not allow us to give a specific…
Read more

April 14, 2014 0