Enhancing Skills

Monthly Archives: August 2024

awk: Pattern scanning and processing language

The tr command is used to translate or delete characters from input data. It’s commonly used for tasks such as changing character case, replacing specific characters, or deleting unwanted characters. Basic Syntax Options Examples 1. Convert Lowercase to Uppercase Command: Sample Input: Sample Output: Explanation: 2. Delete Specific Characters Command: […] Read more »

cut: Extract sections from each line of input

The cut command is used to extract sections from each line of input files or streams. It operates on text files or input streams and allows you to select specific columns or fields based on delimiters. Basic Syntax Options Examples 1. Extract Specific Fields from a CSV File Command: Sample […] Read more »

awk: A Versatile Text Processing Tool

awk: Pattern Scanning and Processing Language Description: awk is a powerful text-processing language used for pattern scanning and reporting. It is particularly useful for handling data in text files and performing complex text manipulations and report generation. Common Arguments: Sample Code and Usage: Command: Sample File (file.csv): Execution: Explanation: Pre […] Read more »

which: Locate executable

The which command in Linux is used to locate the executable file associated with a given command in your system’s PATH. It returns the path of the executable that would have been executed if the command had been entered at the command line. Syntax Example Usage Output: Output: Output: Options […] Read more »

logrotate: Log Rotation in Linux

Overview Log rotation is the process of automatically managing the growth of log files. In Linux, the logrotate utility is commonly used to handle log rotation. It helps to compress, rename, delete, and manage log files, ensuring that they don’t consume excessive disk space and that the system maintains a […] Read more »

Learning Linux: Mastering the Essentials

My son has recently developed an interest in learning Linux, which inspired me to delve deeper into the system myself. Linux offers a rich environment for understanding the foundations of computing, from basic commands to advanced scripting. This collection of articles serves as a guide for anyone looking to master […] Read more »

Bash Shell Scripting: A Comprehensive Guide

Bash (Bourne Again SHell) is a popular Unix shell and command language. Writing shell scripts allows you to automate tasks and manage system processes efficiently. This guide covers basic concepts, common commands, and provides sample scripts to get you started. 1. Introduction to Bash Scripts A Bash script is a […] Read more »

Important environment variables commonly used in Linux

Variable Description HOME Path to the current user’s home directory. PATH List of directories that the shell searches for executable files. USER Username of the currently logged-in user. SHELL Path to the current user’s default shell. PWD Current working directory. OLDPWD Previous working directory, before the last directory change. LANG […] Read more »

ufw: Uncomplicated Firewall

Description: A user-friendly frontend for managing firewall rules on Linux. ufw is designed to make configuring a firewall easier by providing a straightforward command-line interface. Command to Enable UFW Command to Check UFW Status: Command to Allow Incoming Traffic on Port 8080: Command to Deny Incoming Traffic on Port 3306: […] Read more »

history: Command History Management

history: Display or manipulate the command history list. Description: Shows the list of commands previously executed in the shell. Useful for recalling and reusing commands without retyping them. This will execute the command listed as number 3 in the history list. Output: Command to Execute a Specific History Entry: Output: […] Read more »