Pradeep Jhuriya

Pradeep Jhuriya

78 Articles Published

Articles by Pradeep Jhuriya

Page 7 of 8

Run a Function in a Script from the Command Line on Linux

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

BASH (Bourne Again Shell) is a Unix shell and command language widely used in Linux and Unix-like operating systems. One powerful feature of BASH is the ability to create and use functions within script files. Functions are reusable blocks of code that perform specific tasks and can be executed from within the script or directly from the command line. Prerequisites Before we begin, you will need − A Linux system with a command line interface (or SSH access). A script containing a function you want to run (your custom script). The required permissions to execute the ...

Read More

Limiting Process Resource Consumption in Unix

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 403 Views

In Unix-based operating systems, managing process resource consumption is crucial for system stability and performance. When processes consume excessive resources, they can cause system slowdowns, unresponsiveness, or even crashes. Unix provides several mechanisms to control and limit resource usage by individual processes or groups of processes. The two primary methods for limiting process resource consumption are the ulimit command for per-process limits and cgroups (control groups) for managing resource allocation across groups of processes. These tools help system administrators maintain optimal system performance and prevent resource starvation. Using the ulimit Command The ulimit command sets resource limits ...

Read More

Soft-Delete Files from the Terminal on Linux

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 761 Views

When working with files in the terminal on Linux, there may be times when you want to delete a file but also keep a copy of it just in case. This is where the concept of "soft delete" comes into play. A soft delete allows you to move a file to a designated recycle bin or trash, instead of permanently deleting it. That way, if you accidentally delete a file, you can easily get it back. In this article, we will explore how to delete files from the terminal on Linux using the trash-cli utility and its trash-put command. ...

Read More

Remove Line Endings From a File on Linux

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

Line endings are special characters that mark the end of a line in a text file. On Unix-based systems like Linux, the line ending is represented by a single newline character (). On Windows, the line ending is represented by a combination of a carriage return (\r) and a newline character (), which is referred to as CRLF. Sometimes, you may need to remove line endings from a file for various reasons. For example, you may want to remove line endings before using it as input to a command that expects a single line of input, or to make ...

Read More

What is a .pid File in Linux?

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

On Linux, a .pid file is a process identification (PID) file that stores the process ID of a running process. The PID is a unique number assigned to each process when it starts and serves as the process identifier within the operating system. These files are typically located in /var/run or /var/run/ directories and are named after the process they represent. What is a PID File? A PID file is a simple text file containing the process ID of a running process. It gets created when the process starts and is deleted when the process terminates. System administrators, ...

Read More

Freeing up a TCP/IP Port on Linux

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

TCP/IP ports are communication endpoints used by applications to connect and exchange data over networks. In Linux systems, sometimes a specific port may be occupied by a running process or application, preventing other services from binding to it. This situation requires freeing up the port by properly identifying and stopping the process using it. This article explains how to identify processes using specific ports and demonstrates various methods to free up TCP/IP ports on Linux systems using common command-line tools. Identifying Processes Using Ports Before freeing a port, you must first identify which process is using it. ...

Read More

Linux watch Command

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

The watch command in Linux is a powerful tool that allows you to execute a program periodically, showing output in fullscreen. This command runs the specified command repeatedly, displaying its output and errors. By default, the specified command runs every two seconds and watch runs until interrupted. In this article, we will explore the various options and uses of the watch command. Syntax The basic syntax of the watch command is − watch [options] command Common Options Option Description -d, --differences Highlights differences between successive updates ...

Read More

Here Document And Here String in Bash on Linux

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

Here documents and here strings are powerful Bash features that allow users to pass multi-line input to commands without using external files. These redirection mechanisms are essential for shell scripting, enabling clean and readable code for tasks involving multi-line text processing, configuration generation, and command automation. What is a Here Document? A here document (heredoc) is a type of input redirection that allows you to specify multiple lines of input for a command using the

Read More

How to List All Connected SSH Sessions on Linux

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

Secure Shell (SSH) is a commonly used protocol for secure remote access to Linux servers. When multiple users are connected to a Linux server via SSH, it can be useful to list all connected SSH sessions for administrative or monitoring purposes. In this article, we will discuss how to list all connected SSH sessions on Linux using various command-line tools. Using the who Command The who command is a simple and widely available command-line tool for listing logged-in users on a Linux system. To list all connected SSH sessions, you can use the who -a command. The -a ...

Read More

Best Syslog Servers for Linux and Windows

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

System logging is a critical aspect of IT infrastructure management, and Syslog servers play a significant role in the process. Syslog servers are responsible for collecting and storing log messages generated by various network devices and servers. These log messages contain vital information about the network's security, performance, and stability, and they help administrators detect, diagnose, and resolve issues. Syslog Architecture Network Devices Applications System Logs Security Events ...

Read More
Showing 61–70 of 78 articles
« Prev 1 4 5 6 7 8 Next »
Advertisements