Archives for Linux - Page 2

Linux

Deleting Lines Containing Specific string from multiple files

Deleting Lines Containing Specific string from multiple files Deleting Lines Containing Specific string from multiple files recursively Syntax: grep -Rl "STRING" /directory/path/ | xargs sed -i "/STRING/d" Example: Below example delete lines containing @license tag from src/main/php directory all files recursively grep -Rl "@license" src/main/php | xargs sed -i "/@license/d"…
Continue Reading

Install Opencv in CentOS

What is OpenCV? OpenCV (Open Source Computer Vision Library) is an Open Source Library for computer vision, machine learning and image processing. You can use OpenCV with multiple programming languages like Python, Java, C++. OpenCV can be used to process the images, identify objects, face detection, real-time traffic monitoring, lane…
Continue Reading

Install RPM in CentOS

Install RPM in CentOS RPM Package Manager (RPM), originally called the Red-hat Package Manager, is a program to install or uninstall software packages or libraries in Linux. To install RPM in CentOS, first download the RPM: $ wget now check in your directory will be available for install RPM in…
Continue Reading

Run Mysql Query from Command Line

Shell script to run mysql query from command line without login into mysql command prompt.  You can use these shell script for quickly execution of MySQL query from a Linux Shell. Method 1: #!/bin/bash #Script to run mysql query from command line #Db Connection. DB_USER='root' DB_PASSWD='mypwd' DB_NAME='mydb' #Prepare sql query QUERY='select *…
Continue Reading
12
Verified by MonsterInsights