Managing Empty Lines, Comments, Line Endings, and Duplicates in Vim

Removing Blank Lines To delete all blank lines and those containing only whitespace: :g/^$/d To remove lines that contain only spaces or tabs: :g/^\\s\*$/d To eliminate lines starting with #, or with spaces or tabs followed by #: :g/^\\s\*#/d For PHP configuration files where comments start with ;: :g/^\\s\*;/d To delete lines from the second l ...

Posted on Wed, 20 May 2026 04:38:34 +0000 by yellowepi

CentOS 7 Cron Task Setup Guide

On CentOS systems, cron is the go-to utility for scheduling recurring tasks, though three scheduling tools exist for different use cases: at One-time execution only; requires the atd backend daemon to run cronie/crontab Recurring task execution; requires the crond daemon, with tasks managed via crontab anacron Daily-based schedulin ...

Posted on Wed, 20 May 2026 00:10:13 +0000 by Vertical3

Installing MySQL 8.0 on Tencent Cloud Lighthouse Server Running CentOS

Setting Up Your Tencent Cloud Account Before proceeding, ensure you have an active Tencent Cloud account. If you are new to the platform, complete the registration process first. Existing users can simply sign in to their dashboards. Account Verification After registration, you must complete real-name authentication as required by Chinese cloud ...

Posted on Tue, 19 May 2026 23:27:22 +0000 by dandaman2007

Leveraging Linux Primary Selection and Clipboard for Efficient Workflow

Understanding Primary SelectionLinux desktop environments offer a powerful but often overlooked feature called Primary Selection, distinct from the traditional clipboard system. When text is highlighted in most applications, it automatically becomes available in the Primary buffer. Pasting is accomplished via the middle mouse button, eliminatin ...

Posted on Tue, 19 May 2026 06:47:59 +0000 by juancuca

Setting Environment Variables in Linux: .bashrc vs /etc/profile

Understanding Environment Variables Environment variables are parameters that define the operating enviroment for processes and users. The most frequantly used example is PATH, which tells the system where to locate executable files when you type a command without specifying its full directory path. For instance, after installing Java on Window ...

Posted on Tue, 19 May 2026 04:41:23 +0000 by sogno

Installing and Configuring RabbitMQ with PHP AMQP Extension on Linux

System Dependency Installation Install required system packages: yum install ncurses-devel unixODBC unixODBC-devel xmlto libtool autoconf Erlang Runtime Setup Download and compile Erlang, which is required by RabbitMQ: wget http://erlang.org/download/otp_src_18.1.tar.gz tar -zxvf otp_src_18.1.tar.gz cd otp_src_18.1 ./configure --prefix=/usr/lo ...

Posted on Tue, 19 May 2026 03:44:30 +0000 by Janco

Configuring Persistent Disk Mounting on Ubuntu

1. Identify the Target DiskUse the lsblk or fdisk utility to list available block devices and identify the correct drive identifier.lsblk # or sudo fdisk -l 2. Create a FilesystemIf the disk is unformatted, create a new filesystem. The following example formats the partition /dev/sdc1 using the ext4 filesystem.sudo mkfs.ext4 /dev/sdc1 3. Create ...

Posted on Tue, 19 May 2026 03:22:02 +0000 by sarabjit

Deploying MySQL 8.0 on CentOS 7: A Step-by-Step Walkthrough

Prerequisites and Initial Setup Start with a minimal CentOS 7 environment to avoid conflicts. Create a temporary workspace for the installation bundle. mkdir -p /mysql cd /mysql wget https://cdn.mysql.com/archives/mysql-8.0/mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar tar -xvf mysql-8.0.16-2.el7.x86_64.rpm-bundle.tar Cleaning Up Existing MariaDB o ...

Posted on Mon, 18 May 2026 17:50:33 +0000 by FURQAN

Comprehensive Docker Setup and Usage Guide

Installing Docker on Linux curl -fsSL https://get.docker.com | sudo bash If the installation complains about missing dependencies: sudo apt-get -f install Granting Non-root Access sudo usermod -aG docker $USER newgrp docker Verify the daemon is reachable: docker info Speeding Up Pulls with a Mirror Create or edit /etc/docker/daemon.json: { ...

Posted on Mon, 18 May 2026 08:00:41 +0000 by sellfisch

Understanding Linux Capabilities for Privilege Management

Introduction to Capabilities Traditional UNIX privilege checks divide processes into two categories: privileged processes (effective user ID 0, known as superuser or root) and unprivileged processes (effective UID non-zero). Privileged processes bypass all kernel permission checks, while unprivileged processes undergo full permission checks bas ...

Posted on Mon, 18 May 2026 07:23:20 +0000 by renno