Satish Kumar

Satish Kumar

937 Articles Published

Articles by Satish Kumar

Page 22 of 94

How to Delete all Text in a File Using Vi/Vim Editor?

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 45K+ Views

Vi and Vim are powerful text editors widely used in Unix/Linux environments for editing plain text files, system configuration files, and programming source code. Vi stands for visual editor, while Vim stands for Vi Improved. Originally developed by Bill Joy in 1976, these editors offer extensive functionality including syntax highlighting, search-and-replace, macros, and efficient handling of large files. One common task is completely clearing a file's content, which can be accomplished using specific commands. Basic Vi/Vim Commands Opening a File To open a file in Vi/Vim, use the command line to navigate to the file's directory ...

Read More

When to Use an Alias vs Script vs a New Function in Bash

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 502 Views

When working with Bash, it's important to understand the differences between using an alias, a script, and a function. Each has its own unique use case and can be used to accomplish different tasks efficiently. Aliases An alias is a way to create a shortcut for a command or series of commands. They are defined using the alias keyword followed by the desired shortcut and the command it should reference. For example, the following creates an alias for the ls -la command − alias ll='ls -la' This allows the user to type ll instead ...

Read More

Do network file systems pre-fetch

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 557 Views

In a networked computing environment, network file systems (NFS) allow users to access and manage files across different computers and storage devices over a network. A client machine can access files stored on a remote server as if they were on its local file system. One important performance optimization technique used in network file systems is pre-fetching − the proactive loading of data that is likely to be accessed soon. What is Pre-fetching in Network File Systems? Pre-fetching is a technique used to improve file system performance by anticipating data that a user might access and proactively loading ...

Read More

8 Best Open Source Web Servers

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 3K+ Views

Web servers are essential components of internet infrastructure that enable the delivery of web content to users worldwide. A web server is a software application that runs on server hardware and responds to HTTP requests from web browsers, serving static files, dynamic content, and web applications. This article explores eight of the most popular and reliable open source web servers used across the industry today. Apache HTTP Server Apache HTTP Server remains the world's most widely deployed open source web server since its initial release in 1995. Maintained by the Apache Software Foundation, it runs seamlessly across multiple ...

Read More

How To Delete Git Tag?

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 4K+ Views

Git tags are labels assigned to specific points in the history of a repository. They serve as markers that identify important milestones such as releases, versions, or checkpoints in the development process. Unlike branches, Git tags are immutable references that provide an easy way to identify specific commits without remembering their hash values. Why Delete Git Tags? There are several scenarios where you might need to delete Git tags: Accidentally created a tag with the wrong name or version Need to clean up old or obsolete tags cluttering the repository Want to recreate a tag pointing ...

Read More

Aborting a shell script on any command fails

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 14K+ Views

By utilizing Bash scripts, we can have access to a powerful programming language. Writing such scripts is an efficient way to run several commands one after the other. However, by default, even if one command fails, the others will still be executed, which can lead to unexpected behavior or data corruption. We'll learn how we can add some safeguards so that these errors don't happen. The example code has been tested in Bash and should also work for other POSIX-compatible shell environments. The Problem Let's first take a look at how Bash handles error messages by default. ...

Read More

Using sed With a Literal String Instead of an Input File

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 1K+ Views

The sed (Stream Editor) command is a powerful text processing tool that typically operates on files. However, it can also process literal strings directly without requiring input files. This capability is particularly useful for quick text transformations, scripting, and pipeline operations where you need to manipulate text data on-the-fly. Using the Echo Command with Pipes The most common method to use sed with a literal string is by piping the output of the echo command to sed. This approach allows you to process text directly from the command line. echo "This is an old string" | ...

Read More

How to check whether a process with a given PID is running

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 19K+ Views

As a system administrator or developer, it's important to be able to monitor and manage processes running on your system. One of the key pieces of information you need to know is whether a particular process is currently running. In this article, we'll explore different ways to check whether a process with a given PID is running. What is a PID? Before we dive into ways to check if a process with a given PID is running, let's first define what a PID is. A PID (Process Identifier) is a unique identification number assigned to each process running ...

Read More

How to Reverse Order of Lines in a File in Linux

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 8K+ Views

As a Linux user, you often need to reverse the order of lines in a file for various purposes like reading log files from most recent entries first, processing data in reverse chronological order, or preparing files for specific operations. This article explores several Linux commands that can accomplish this task efficiently. Using tac Command to Reverse Order of Lines The tac command (which is "cat" spelled backwards) is the simplest and most direct way to reverse line order in a file. It reads the file from end to beginning and prints each line in reverse order. ...

Read More

10 Cron Scheduling Task Examples in Linux

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 2K+ Views

Linux is an operating system that is widely used in servers, supercomputers, and mobile devices. One of the powerful features of Linux is the ability to schedule tasks using a tool called Cron. Cron is a time-based job scheduler in Linux that allows users to run scripts or commands at specified intervals. In this article, we will discuss 10 practical Cron scheduling task examples in Linux. What is Cron? Cron is a time-based job scheduler in Linux that allows users to automate tasks at specified intervals. It can run scripts or commands at a specific time or a ...

Read More
Showing 211–220 of 937 articles
« Prev 1 20 21 22 23 24 94 Next »
Advertisements