Essential Linux Command-Line Tools for File and Text Manipulation
Pattern Matching with grep
The grep utility searches for patterns within files or directory trees.
grep "error" system.log
grep -i "failed" app.log # Case-insensitive matching
grep -w "function" script.sh # Whole word matches only
grep -e "warning" -e "alert" debug.txt # Multiple ...
Posted on Sat, 19 Sep 2026 16:47:45 +0000 by Jacquelyn L. Ja
Essential Commands for Searching and Monitoring Log Files in Linux
Monitoring Live Log Updates with Tail
The tail command is primarily used with the -f flag to monitor a file in real-time as new data is appended.
-f, --follow[={name|descriptor}]
Continuously display new output as the file grows.
Without an argument, it defaults to 'descriptor'.
Example us ...
Posted on Thu, 20 Aug 2026 16:15:49 +0000 by dfarrell
Shell Pattern Matching with Wildcards and Regular Expressions
Wildcards
Shell wildcards are used for filename and directory name matching. They are processed by the shell and appear exclusively in command arguments.
Wildcard Patterns
Pattern
Description
*
Matches any sequence of characters, including empty strings
?
Matches exactly one character
[]
Matches any single character within the specif ...
Posted on Fri, 31 Jul 2026 16:08:52 +0000 by dillonit
Essential Linux CLI Commands for System Administration and Development
Text Search and Pattern Matching
The grep utility filters input streams based on regular expressions. Appending the -i flag forces case-insensitive comparisons, which is useful when parsing unstandardized logs.
grep -i "authentication failed" auth.log
File Discovery and Size Queries
find traverses directory hierarchies and applies te ...
Posted on Tue, 07 Jul 2026 17:09:01 +0000 by babak
Understanding and Applying Regular Expressions in Linux
Regular expressions (regex) are patterns used to match character combinations in text, consisting of literal characters and metacharacters with special meanings. They enable efficient searching, extraction, and manipulation of text based on defined rules.
In Linux environments, regex is intergal to commend-line utilities like grep, sed, and awk ...
Posted on Sun, 21 Jun 2026 17:49:36 +0000 by andriy
Mastering Linux File Inspection, Filtering, Archiving, and Terminal Editors
Viewing and Navigating File Streams
The cat utility dumps an entire file's contents directly to standard output. For large datasets requiring paginated reading, more or less provide an interactive terminal viewer.
cat /etc/os-release
less /etc/nginx/nginx.conf
Press q inside the pager to exit cleanly.
Extracting Boundary Lines
head and tail st ...
Posted on Fri, 05 Jun 2026 17:34:40 +0000 by erfg1
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
Modifying Network Configuration and Text Processing in Linux
Modifying Network Interface Configuraton
1. Update the Network Configuration File
Edit the configuraton file for the target interface (e.g., ens33).
vim /etc/sysconfig/network-scripts/ifcfg-ens33
Adjust the following parameters:
NAME=enp0 # Corresponds to net.ifnames=0
DEVICE=enp0 # Corresponds to biosdevname=0
2. Rename the Configuratio ...
Posted on Mon, 11 May 2026 09:45:57 +0000 by yogadt