Pradeep Jhuriya

Pradeep Jhuriya

78 Articles Published

Articles by Pradeep Jhuriya

78 articles

Jobs and Job Control in Linux

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 7K+ Views

In the Linux operating system, jobs refer to processes that are running in the background or foreground. Job control refers to the ability to manipulate these processes, including suspending, resuming, and terminating them. This feature enables users to manage multiple tasks efficiently and debug process-related issues. Job control is made possible by the shell, which is a command-line interface that allows users to interact with the operating system. The most common shell in Linux is the Bourne Again Shell (BASH), but other shells such as the Z Shell (ZSH) and the Korn Shell (KSH) also support job control features. ...

Read More

Write a Bash Script that Answers Interactive Prompts

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 7K+ Views

Interactive prompts are a common feature in many Linux command-line tools and utilities. These prompts allow the user to provide input or make a selection in order to proceed with a task. While interactive prompts can be useful in some situations, they can also be a nuisance when running scripts or automating tasks. In these cases, it can be helpful to know how to automatically answer interactive prompts. Methods for Handling Interactive Prompts There are several ways to automatically answer interactive prompts in Linux. One method is to use the expect command, which is a scripting language specifically ...

Read More

Uses of Exec Command in Linux

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 4K+ Views

The exec command is a built-in command in Unix and Linux shells that replaces the current shell process with a new process. Unlike regular command execution that creates a child process, exec overlays the current process entirely, making it particularly useful for process management and resource optimization in shell scripts. The basic syntax of the exec command is: exec [-cl] [-a name] [command [arguments...]] [redirection...] How Exec Works When you execute a command normally, the shell creates a new child process while keeping the parent shell running. With exec, the new command completely replaces ...

Read More

Creating a Temporary File in Linux

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 7K+ Views

In Linux, it is often necessary to create temporary files for various purposes, such as storing intermediate data during processing or storing configuration information for a script. Temporary files are usually created in the /tmp directory, which is a standard location for storing temporary files on most Linux systems. The mktemp Command The most common and secure method to create temporary files in Linux is using the mktemp command. This command creates a unique temporary file with proper permissions and prints the file name to the console. Syntax mktemp [options] [template] The template ...

Read More

Delete Multiple Files at Once in Bash

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 8K+ Views

Bash is a Unix shell and command language that is commonly used on Linux systems. It allows users to perform a variety of tasks, including deleting files. In this article, we will look at how to delete multiple files at once in Bash on a Linux system. We will cover the basic syntax for deleting multiple files, as well as some advanced techniques for deleting specific types of files or forcing the deletion of write-protected files. Using rm Command in Linux The rm command is used to delete files in Bash. To delete a single file, you can ...

Read More

Partitioning Disks in Linux

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 4K+ Views

In Linux, a disk partition is a logical division of a hard disk drive (HDD) or solid-state drive (SSD) that allows you to manage data in a more organized manner. Partitions enable you to separate data by function, such as isolating system files from user files, or setting up multiple operating systems on a single physical disk. There are several tools available for creating and managing disk partitions in Linux, including fdisk, parted, and gparted. This article focuses on using the command-line utilities fdisk and parted as they are widely available on most Linux distributions and provide precise control ...

Read More

Measure CPU usage for a process on Linux?

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 7K+ Views

On modern multi-core CPUs, monitoring CPU usage of individual cores for specific processes is essential for performance analysis and identifying system bottlenecks. This article demonstrates how to measure CPU core usage for processes on Linux using various command-line tools. Monitoring CPU Usage with top Command The top command is the most common tool for monitoring system resources. By default, it shows aggregate CPU usage, but you can view per-core statistics. To display individual CPU core usage, run top and press 1 to toggle per-core view: $ top Then press 1 to see individual ...

Read More

How to Change the Default Home Directory of a User on Linux?

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 65K+ Views

When you create a user on a Linux system, that user is given a default home directory. This home directory is a personal space where the user can store their files and settings. Sometimes it may be necessary to change a user's default home directory on a Linux system. This could be because you want to provide a different location for the user's files or because you want to change the user's name and update the home directory accordingly. Prerequisites Before you get started, there are some prerequisites you should be aware of − You must ...

Read More

How to Append Contents of Multiple Files Into One File on Linux?

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 35K+ Views

There are many situations where you may need to combine the contents of multiple files into one file. For example, you may have a number of log files that need to be analyzed or you may want to merge multiple text documents into one document for easy editing. On Linux, there are several ways to append the contents of multiple files into a single file, and in this article, we'll explore some of the most popular and effective methods. Method 1: Using the cat Command The cat command is the most common and straightforward tool for concatenating files. ...

Read More

Get the Contents of a Web Page in a Shell Variable on Linux

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 3K+ Views

One of the most useful and powerful features of the Linux command line is the ability to manipulate text. This can be especially useful when working with web pages, as web page content can often be saved as plain text and then manipulated with command-line tools. In this article, we will explore how to store the content of a web page into a shell variable in Linux. What is a Shell Variable? A Shell variable is a value stored in memory that can be used by the shell (command-line interface) and other programs. Shell variables are usually defined ...

Read More
Showing 1–10 of 78 articles
« Prev 1 2 3 4 5 8 Next »
Advertisements