Prateek Jangid

Prateek Jangid

165 Articles Published

Articles by Prateek Jangid

Page 2 of 17

How To List All Group in Linux ?

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 2K+ Views

Groups in Linux are collections of users that provide a convenient way to manage permissions and resource access. A Linux system can have many users organized into multiple groups, where administrators assign specific privileges to control file and directory access. Users can belong to two types of groups − Primary / Login Group Secondary / Supplementary Group User-created files are assigned to this group. The primary group usually has the same name as the user. Grants additional privileges to a set of users for specific tasks or resources. Users ...

Read More

List the Size of Each File and Directory and Sort by Size in Linux

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 3K+ Views

Listing and sorting files and directories by size is essential for system administration, disk space management, and file organization. Linux provides multiple command-line tools and GUI methods to accomplish this task efficiently. This guide covers various approaches to list files and directories sorted by their size. Command Line Methods Using the ls Command The ls command is the most common tool for listing directory contents. By default, it sorts entries alphabetically, but you can modify this behavior with specific options. Basic listing with detailed information: ls -la This displays all files (including ...

Read More

Print Lines Between Two Patterns in Linux

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 3K+ Views

Printing lines between two patterns is a common text processing task in Linux when you need to extract specific sections from files. While the grep command can find lines matching patterns, it cannot easily extract content between two different patterns. For this purpose, sed and awk commands provide powerful pattern-matching capabilities. This article demonstrates various methods to print lines between two patterns using sed and awk commands with different conditions and filtering options. Sample File Setup First, let's create an example file to demonstrate the pattern matching techniques − cat example.txt Information ...

Read More

Processing Linux Commands in Parallel

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 13K+ Views

Processing Linux commands in parallel allows administrators to execute multiple commands simultaneously, significantly improving efficiency when performing tasks like system updates, service management, and file operations. Command chaining is the technique of combining multiple commands using various operators and methods. Using the & (Background) Operator The & operator runs commands in the background, allowing the shell to execute the next command without waiting for the previous one to complete. command1 & command2 Example running ls and cat commands simultaneously: ls & cat Linux.txt [1] 6178 Don't erase the existing ...

Read More

Set Up cURL to Permanently Use a Proxy on Linux

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 1K+ Views

cURL is a command-line tool used to request data from servers and transfer it to devices. The user specifies the server URL and any data to be sent. cURL works on Windows, macOS, and Linux, supporting over 25 protocols including SFTP, FTP, HTTPS, and HTTP. It is one of the best open-source tools for API calls and debugging network requests. A proxy server acts as an intermediary between users and websites, transferring traffic while providing security and functionality layers. When using a proxy, internet requests first go to the proxy server, which evaluates them against predefined rules before forwarding ...

Read More

Using grep on Files That Match Specific Criteria

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 2K+ Views

The grep (global regular expression print) command is a powerful text-processing utility that searches for specific patterns in files using regular expressions. It filters and displays lines containing the specified pattern, making it one of the most essential commands for system administrators and developers on Unix/Linux systems. Unlike other operating systems, finding content within files in Linux is straightforward with grep. This command can search through single files, multiple files, or entire directories, displaying matching lines or just the filenames that contain your search pattern. When using grep, keep these important points in mind: Grep is ...

Read More

How to Reverse a String using Unix Shell Programming?

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 11K+ Views

Bash is a shell or command line interpreter that serves as a programming language for executing commands and scripts. It allows users of Unix-like systems and Windows (via Windows Subsystem for Linux) to control the operating system using text-based commands. In this article, we will solve the problem of reversing a string using Shell scripting. Given a string input, we need to print its reverse using Shell programming techniques. Input : str = "Hello" Output : "olleH" Explanation : Reverse order of string "Hello" is "olleH". Input : str = "yam" Output : "may" ...

Read More

Changing the Default Shell in Linux

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 2K+ Views

Changing the default shell in Linux is a common administrative task that gives you the flexibility to use different command-line interfaces. The default shell of most Linux systems is bash, but you can replace it with alternatives such as sh, fish, dash, or zsh. There are several reasons why you might need to change your default shell: To disable or block normal user logins using a nologin shell. Change the default shell on a shared network to meet specific user requirements. Implement shell wrapper programs that control command execution until proper authentication. This guide covers all ...

Read More

Resetting a Root Password in Linux without External Media

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 595 Views

Resetting a root password in Linux is a critical system recovery technique that allows administrators to regain access to their system without external media. This method works by temporarily modifying the boot process to gain direct root shell access. We'll demonstrate this using CentOS 8.2, but these procedures work with most Linux distributions, though some Debian-based systems may require slight modifications. Prerequisites Physical access to the Linux server (cannot be performed remotely over a network) Basic familiarity with the Linux command line environment Ability to work quickly during the boot process Step-by-Step Password Recovery Process ...

Read More

Reverse a Number in PL/SQL

Prateek Jangid
Prateek Jangid
Updated on 14-Mar-2026 15K+ Views

PL/SQL is a block-structured language that combines SQL's functionality with procedural commands. In this article, we will discuss a program in PL/SQL to reverse a given number. Input : 98765 Output : 56789 Explanation : reverse number of 98765 is 56789. Input : 56784 Output : 48765 Explanation : Reverse number of '56784' is '48765'. Algorithm to Reverse a Number The algorithm to reverse a number involves extracting digits from the original number and building the reversed number step by step: Take out the last digit from the number ...

Read More
Showing 11–20 of 165 articles
« Prev 1 2 3 4 5 17 Next »
Advertisements