Skip to main content

Posts

Using Grep & Regular Expressions to Search for Text Patterns in Linux #centos #linux

Using Grep & Regular Expressions to Search for Text Patterns in Linux Introduction One of the most useful and versatile commands in a Linux terminal environment is the "grep" command. The name "grep" stands for "global regular expression print". This means that grep can be used to see if the input it receives matches a specified pattern. This seemingly trivial program is extremely powerful when used correctly. Its ability to sort input based on complex rules makes it a popular link in many command chains. We will explore some options and then dive into using regular expressions. All of the techniques discussed in this guide can be applied to managing your VPS server. Table of Contents Basic Usage Common Options Regular Expressions Literal Matches Anchor Matches Matching Any Character Bracket Expressions Repeat Pattern Zero or More Times Escaping Meta-Characters Extended Regular Expressions Grouping Alternation Quantifier...

Create Network team #centos #teaming

#nmcli connection show Its oupt show the used interface #nmcli connection add con-name team0 type team ifname team0 config ‘{“runner”:{“name”:”activebackup”}}’ #nmcli connection modify team0 ipv4.addresses ’10.100.2.6/24 10.100.2.1’ ipv4.method manual #nmcli connection add con-name team0-slave1 type team-slave ifname en01 master team0 #nmcli connection add con-name team0-slave2 type team-slave ifname en02 master team0 #nmcli connection down team0-slave1 #nmcli connection down team0-slave2 #nmcli connection down team0 #nmcli connection up team0-slave1 #nmcli connection up team0-slave2 #nmcli connection up team0 #ifconfig #nmcli connection show team0 | grep ipv4 #ping –I team0 10.100.2.1 #teamctl team0 state

# touch file touch: cannot touch `file': Read-only file system

Problem: # touch file touch: cannot touch `file': Read-only file system # cat /proc/mounts rootfs / rootfs rw 0 0 /dev/root / ext3 ro,data=ordered 0 0 Solution: First check your /etc/fstab file and if root mount is comment then ucomment it If you are not able uncomment then follow the following procedure First go to grub rescue mode 1. Reboot your system 2. Press esc 3. press e 4. go to linux16 and end of this line of code 5. press ctrl+x 5. mount -o remount,rw / 6. vi /etc/fstab 7. save and exit 8. reboot

Load Statistics graph weird encoding #javamelody #font #font_issue

Problem: If we deploy our application (*.war) on a customer's infrastructure, all texts in graphs are broken. The very same montioring of the application works when deployed in our local infrastructure. All "plain" texts are rendered corretly. Only graphs are affected The problem seems to be environment specific I've no clue what we need to do/install/change on the customers environment to be able to have proper texts in graphs again. When we first installed the application the graphs worked. Our customers administrators have updated the system / installed patches since then but cannot tell what they've done exactly. I've never seen java melody showing broken graphs before. Broken Dashboard: Betriebssystem: | Linux, 3.10.0-693.2.2.el7.x86_64 , amd64/64 (16 Kerne) Java: | Java(TM) SE Runtime Environment, 1.8.0_111-b14 JVM: | Java HotSpot(TM) 64-Bit Server VM, 25.111-b14, mixed mode Server: | Apache Tomcat/8.0.36 Same Application works fine i...

How To Share Data Between the Docker Container and the Host #docker #share #folder

 How To Share Data Between the Docker Container and the Host Introduction In general, Docker containers are ephemeral, running just as long as it takes for the command issued in the container to complete. By default, any data created inside the container is only available from within the container and only while the container is running. Docker volumes can be used to share files between a host system and the Docker container. For example, let's say you wanted to use the official Docker Nginx image and keep a permanent copy of Nginx's log files to analyze later. By default, the  nginx  Docker image will log to the  /var/log/nginx  directory  inside  the Docker Nginx container. Normally it's not reachable from the host filesystem. In this tutorial, we'll explore how to make data from inside the container accessible on the host machine. Prerequisites To follow this article, you will need an Ubuntu 18.04 server with the following: A no...