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
Managing File Timestamps and Generating Fixed-Size Files in Linux
Setting File Modification Time
The stat command displays detailed timestamp information for a file:
stat /opt/test.conf
To create a file or update its modification time, use touch with the -m and -d options:
# Create or update modification time to July 7, 2020
touch -m -d "2020-07-07 00:00" /opt/abc.txt
If the file doesn’t exist, it ...
Posted on Mon, 14 Sep 2026 16:49:46 +0000 by ChetUbetcha
Linux File Operations, Remote Sync, and Automated Backups with cron and tar
1. Locating Files with find
# Search every directory for a file called nginx.conf
find / -type f -name nginx.conf
# Limit the search to /etc for faster results
find /etc -type f -name nginx.conf
# Wildcards: list every .conf file under /etc
find /etc -type f -name "*.conf"
# Combine wildcard and prefix
find /etc -type f -name " ...
Posted on Sun, 16 Aug 2026 16:24:15 +0000 by BrandonRoy
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
Comprehensive Guide to the Linux find Command
Command Structure
The find command syntax consists of three primary components:
find /etc -name "passwd"
The first segment is the commmand itself, followed by the target directory path. Multiple paths can be specified:
find /etc /var /usr -name "passwd"
The third segment contains expressions that define search criteria and ...
Posted on Sun, 10 May 2026 01:54:51 +0000 by Ty44ler
File Search Techniques: find and mdfind Commands
The find Command
The find command is a powerful utility for locating files within a directory hierarchy. Available on Unix, Linux, and macOS systems, it supports various search criteria including filename patterns, file types, modification times, and permisions.
Basic Syntax
find [path] [expression]
The command traverses the specified director ...
Posted on Sat, 09 May 2026 18:08:32 +0000 by nmpku