The Three Musketeers of Linux: Text Processing Tools in the Command Line

The Three Musketeers of Linux: Text Processing Tools in the Command Line

The Three Musketeers of Linux grep -n:Print line numbers -A:After, print the N lines after the matched content -B:Before, print the N lines before the matched content -C:Center, print N lines before and after the matched content -E: Support extended regex, e.g., grep -E 'root|nginx' /etc/passwd -v:Invert the match -o:Only print the matched content -w:Exact … Read more

Linux – Regular Expressions

Linux - Regular Expressions

Regular expressions include basic and extended regular expressions. ★ Basic Regular Expressions (BRE) Executed using the grep command grep/sed/awk support basic regular expressions 01- ^ indicates lines starting with… ## cat -A can display spaces and other placeholders$ cat -A oldboy2.txtI am oldboy teacher!$I teach linux.$$I like badminton ball ,billiard ball and chinese chess!$my blog … Read more

Linux File Search, The Three Musketeers, and Regular Expressions

Linux File Search, The Three Musketeers, and Regular Expressions

Linux File Search 1. Overview of the find Command The need for file searching arises because we often forget the location of a file, and at such times, we need to use the find command to locate it. The find command can search for files based on various criteria, such as file name, file size, … Read more

Detailed Usage of the Linux gron Command

Detailed Usage of the Linux gron Command

Introduction <span><span>gron</span></span> is a unique command-line tool that converts <span><span>JSON</span></span> data into discrete, easily <span><span>grep</span></span>-processable assignment statement format. Its name comes from “<span><span>grepable on</span></span>” or “<span><span>grepable JSON</span></span>“, primarily addressing the challenge of handling complex <span><span>JSON</span></span> data in the command line. Core Value <span><span>gron</span></span> is centered around flattening <span><span>JSON</span></span> data into a format similar to <span><span>json.path.to.key … Read more

Basic Linux Commands | The grep Command – Your Text Search Master

Basic Linux Commands | The grep Command - Your Text Search Master

grep Command – Your Text Search Master Command Overview In the world of Linux, the grep command is like a master of the art of searching. Its name comes from “Global Regular Expression Print,” which means it can perform global searches in text using regular expressions. This search master can not only find content in … Read more

Differences Between grep and pgrep in Linux

Differences Between grep and pgrep in Linux

<span>pgrep</span> and <span>grep</span> are two different commands in the Linux system. Although their names are similar, they have significant differences in functionality and usage scenarios. Here are their core differences: <span>pgrep</span> is an acronym that stands for “Process-ID Global Regular Expressions Print”. <span>grep</span> is an acronym for “Global Regular Expressions Print”, meaning global regular expression … Read more

Introduction to Linux Shell Programming (Part 2) – grep, sed, awk

Introduction to Linux Shell Programming (Part 2) - grep, sed, awk

Learning and Practicing This article describes commands related to text processing in Shell programming, such as grep, sed, and awk grep: <span>grep is a text search tool used to search for lines in files that match one or more regular expressions.</span> <span>It is fast, flexible, and the standard tool for text searching.</span> <span>grep supports various … Read more

Powerful and Common Commands in Linux: find and grep

Powerful and Common Commands in Linux: find and grep

(Click the public account above to quickly follow) Source: Wu Qin (Tyler) Link: http://www.cnblogs.com/skynet/archive/2010/12/25/1916873.html Working in Linux, some commands can greatly improve efficiency. This article introduces the find and grep commands, which are essential Linux commands that I use almost every day. The structure of this article is as follows: find command General form of … Read more

Detailed Explanation of the Linux grep Command

Detailed Explanation of the Linux grep Command

(Click the public account above to quickly follow) Source:ggjucheng Link: http://www.cnblogs.com/ggjucheng/archive/2013/01/13/2856896.html Introduction grep (global search regular expression (RE) and print out the line) is a powerful text search tool that can search text using regular expressions and print out the matching lines. The grep family in Unix includes grep, egrep, and fgrep. The commands egrep … Read more

Mastering Core Skills in Linux File Compression and Packaging

Mastering Core Skills in Linux File Compression and Packaging

Linux Cloud Computing | Daily Practice | Practical Tools | Career Development In Linux systems, file compression and packaging are essential skills. Whether for saving disk space or facilitating file transfer, mastering these techniques can significantly enhance your efficiency. This article will take you through common compression and packaging formats such as tar, gzip, and … Read more