Mastering the Linux Triad: AWK – The Swiss Army Knife of Data Processing

Mastering the Linux Triad: AWK - The Swiss Army Knife of Data Processing

1. Overview of AWK Basics # Basic Structure awk 'BEGIN{preprocessing} {line processing} END{postprocessing}' filename # Common Variables NR: line number | NF: number of fields | $0: entire line content | $1: first column 2. High-Frequency Practical Scenarios 1. Data Deduplication Example: Retaining Unique Lines # Deduplicate entire lines (keep the first occurrence) awk '!seen[$0]++' … Read more

Linux Web Service Log Statistics Commands

Linux Web Service Log Statistics Commands

Table of Contents Apache Log Statistics Nginx Log Statistics Web Service Status Statistics Other Statistical Combinations Count Statistics This article collects some common statistics commands for Apache/Nginx server logs in Linux operations. Apache Log Statistics # List the top IPs with the most visits today [[email protected] httpd]# cut -d- -f 1 access_log | uniq -c … Read more

Detailed Usage of Linux Operation and Maintenance Monitoring Commands

Detailed Usage of Linux Operation and Maintenance Monitoring Commands

Introduction Mastering system monitoring commands is a fundamental skill for Linux operation and maintenance. This note aims to organize and summarize commonly used monitoring commands along with their core functions and practical scenarios, facilitating quick review and learning to enhance system management and troubleshooting efficiency. 1. Comprehensive Performance Monitoring (CPU, Memory, Load) 1.<span>top</span> •Core Function: … Read more

How to Investigate a Linux System Breach?

How to Investigate a Linux System Breach?

When a company experiences a hacker intrusion; when the system crashes; when a security incident affects normal business operations, can you respond immediately and provide a solution? The following article will teach you the Linux emergency response process! Intrusion Investigation Approach 01 Apache Log Path Access Log: /var/log/apache2/access.log (Debian/Ubuntu) or /var/log/httpd/access_log (CentOS/RHEL) Nginx Log Path … Read more

Linux Shell (1) – Managing Processes

Linux Shell (1) - Managing Processes

1. Exploring Processes in Linuxps Command The key to using the ps command is not to memorize all available options, but to remember the ones that are most useful to you. Most Linux system administrators will keep a set of commonly used options in mind to extract useful process information, while referring to documentation when … Read more

Linux pidof Command

Linux pidof Command

Linux<span>pidof</span> Command 1. Overview In a Linux system, a process is an instance of a program that is currently running. Each process has a unique Process ID (PID). When performing system administration, performance debugging, resource control, and security protection, it is often necessary to know the PID corresponding to a specific program.<span>pidof</span> is a command … Read more

Advanced File System Management in Linux

Advanced File System Management in Linux

Table of Contents Check if the kernel supports quotas Check if the mount properties of the specified partition meet the conditions quotacheck generates configuration files for users and groups edquota edits the quota file to set specified limit sizes Start quota management Stop quota management quota view quota information for specified users and groups repquota … Read more

Linux Shell: From Beginner to Retirement

Linux Shell: From Beginner to Retirement

Learning Linux Shell commands is a gradual process. Beginners can start with basic commands and gradually master scripting and system management. During the learning process, it is recommended to practice hands-on and refer to online documentation and community resources. At the same time, as technology continues to evolve, Linux is also constantly updating. Maintaining a … Read more

Guide to Installing MySQL 5.7 on Linux Without Docker

Guide to Installing MySQL 5.7 on Linux Without Docker

1. Introduction As of April 20, 2025, the latest version of MySQL is 9.2.0, which I have not specifically studied. New versions always come with some new features, and those interested can check the official website for more information. Different versions can affect the execution of certain statements; for example, there are significant differences between … Read more

What Are Some Outdated Designs in Linux/Unix?

What Are Some Outdated Designs in Linux/Unix?

The design philosophy of “everything is a file” is commendable, as it abstracts hardware and processes into files for unified operations. However, this approach becomes less effective in scenarios requiring bidirectional communication, such as network communication, where operating sockets through file read/write operations feels awkward. Windows’ “everything is a handle” is more flexible, as a … Read more