Replace old text with new text Linux Command
[root@srv01 demo]# grep -rl ‘from test old’ . | xargs sed -i ‘s/from test old/from test new/g’
How to Install Nginx, MySQL, PHP (LEMP) Stack on CentOS This guide will help you install Nginx, MySQL, PHP (LEMP) Stack on CentOS machine i.e. Server. LEMP is a software stack comprised of Nginx as Web Server and MySQL as Database server along with PHP as the dynamic content processor for websites. LEMP term is…
Often time, you may need to know which file contains large file size, and delete it to save space. Here’s a code pattern to show you how to find large file size on Linux : 1. File size >= 100MB Find all files that have a size >= 100MB, from root folder and its sub-directories….
Find and replace text within a file using sed command The procedure to change the text in files under Linux/Unix using sed: Use Stream EDitor (sed) as follows: sed -i ‘s/old-text/new-text/g’ input.txt It tells sed to find all occurrences of ‘old-text‘ and replace with ‘new-text‘ in a file named input.txt The s is the substitute…
ERROR:- The response from the remote server was: 550 Please turn on SMTP Authentication in your mail client. mail-qk1-f172.google.com [209.85.222.172]:36503 is not permitted to relay through this server without authentication. SOLUTION:- Manage SMTP restrictions Click Enable to deny users the ability to bypass your mail server to send mail. To allow users the ability to bypass your…
Do you know most of the security vulnerabilities can be fixed by implementing necessary headers in the response header? Security is as essential as content and SEO of your website, and thousands of websites get hacked due to misconfiguration or lack of protection. If you are a website owner or security engineer and looking to protect your…
Update LANG Edit environtment vi /etc/environment add these lines… LANG=en_US.utf-8 LC_ALL=en_US.utf-8 Update and upgrade Core yum -y update yum -y upgrade Install NGINX yum install epel-release yum install nginx Start NGINX and Enable Service systemctl start nginx systemctl enable nginx Install PHP 8.0 Enable Remi Repo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm Check yum –disablerepo=”*” –enablerepo=”remi-safe” list php[7-9][0-9].x86_64…