In Azure Linux VM we have an LVM that holds the data(1.2TB) of a live application. For some reasons, we want to migrate the data of the application to another LVM and decommission the old one. We want to achieve this with minimal downtime. What switches/method we can use using rsync to achieve this? Answer Ac…
Tag: linux
getnameinfo() compile time error – Extracting MAC address in Linux
I have to send to the server the IP address and MAC address of the network interface from which my client socket is connected and communicating with the server. All machines are on intra-net. I have extracted the IP of my socket and I am attempting to extract the H/W address. My strategy : Extract IP of the s…
how to remove the special characters from a variable using shell
I need the perfect alphabetical string without special characters. can you suggest me how to do in shell Answer The following solution uses the tr command: All letters and digits, all ” and new lines are allowed. If you want more or less characters to be allowed change the command.
ambari + API syntax in order to change the parameters of the ambari services
In Ambari cluster GUI ( Version 2.5.0.3 ) , each service has the Config button And when we click on Config button we can see the list of all relevant parameters and their values For example YARN service have the parameter – Minimum Container Size (Memory) in MB Of course we can change from the ambari GU…
g++ can’t link curl lib files
I’m having some issues with getting g++ to link the curl lib files. I’m using Visual Studio 2017 with the linux dev plugin and Ubuntu Server 17.04. curl-config –libs gave an output of -Lcurl which I tried adding to the linker options in Project settings > Linker > Command Line > Add…
no such file or directory after redirection – simple command line program
Im programming a shell. This is a small piece of it that handles redirects. I only included the snippet that is causing the error. This portion of the program is supposed to take a command/argument line and execute the line accordingly. The wc < junk > junk2 is an example of a command line input and for…
Can’t create Docker volume using absolute path on Linux
I’m getting the following error message when trying to run a Docker container with which I want to share some data via a directory (I added the emphasis): ##[error]/usr/bin/docker: Error response from daemon: create -v /opt/vsts/work/1/s/coverage: “-v /opt/vsts/work/1/s/coverage” includes in…
How I can find out if a Linux system uses Wayland or X11?
Used language I am using C++14 with cmake for my program. Problem: I would like to know how I can find out if a Linux system uses Wayland or X11 as a window system to be able to use both APIs in my source code without conflict. Thus creating a window with Wayland when Wayland is available and otherwise use
Remove duplicates and keep line which contains max value from one column – LINUX
everyone! I’d like to remove duplicates and keep lines with the highest value from one column (4th column) in a file with 4 fields. I must do this in a Linux server. Before After Thank you so much and I’m sorry if I asked something repeated! But I didn’t find an answer for my problem. Answer…
psql: could not connect to server: No such file or directory “Centos7”
Not able to access psql database. Below is the error while accessing database: I also tried to look for postmaster.pid but didn’t find it Answer Your server is down or at least not where your psql command thinks it is. You can search your system for postgres.conf which should tell you what port it’…