Vishesh Kumar

Vishesh Kumar

9 Articles Published

Articles by Vishesh Kumar

9 articles

Convert Hex to ASCII Characters in the Linux Shell

Vishesh Kumar
Vishesh Kumar
Updated on 17-Mar-2026 10K+ Views

Hexadecimal (Hex) is a base-16 numbering system that uses digits 0-9 and letters A-F to represent values. Converting hex to ASCII characters is a common task in Linux systems, especially when dealing with encoded data, network protocols, or binary file analysis. Hex digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F ASCII (American Standard Code for Information Interchange) is a character encoding standard that represents text in computers and communication equipment. Each ASCII character corresponds to a specific numeric value that can be expressed in hexadecimal format. ...

Read More

Creating a Hex Dump of a File

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

A hex dump displays the binary contents of a file in hexadecimal format, making it readable for humans. This is essential for programming, reverse engineering, data recovery, and debugging executable files. Linux provides several built-in tools to generate hex dumps of files. To demonstrate these tools, let's first create a sample text file − $ cat > example.txt This is our sample text in the file. We will convert it into hex using various tools. ^D Using hexdump Command The hexdump command is a built-in Linux utility that displays file contents in hexadecimal, decimal, ...

Read More

cURL Command Without Using Cache

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

cURL (Client URL) is a command-line tool that allows data to be transferred to or from a server without requiring user interaction by utilizing the supported libcurl library. cURL can also be used to troubleshoot network connections and test web services. In some cases, we may need to send requests that bypass the cache and generate a fresh response from the server. Caching can occur on the client side (browser cache) or the server side. When using the cURL command, remember that it is only an HTTP client and does not cache any requests on the client side. As ...

Read More

Docker Container Network Namespace Is Invisible

Vishesh Kumar
Vishesh Kumar
Updated on 17-Mar-2026 759 Views

This article examines why Docker container network namespaces are invisible to the ip netns ls command and provides a solution to make them accessible for network debugging and management. Containerization Containerization is a lightweight virtualization technology where applications and their dependencies are packaged into portable containers. Unlike traditional virtual machines, containers share the host OS kernel and system resources, making them faster to start and more resource-efficient. Containers include only the necessary libraries, binaries, and runtime components needed for the application to run consistently across different environments. Docker Docker is a containerization platform that enables developers ...

Read More

How to Add a String After Each Line in a File in Linux?

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

We occasionally need to make changes to files quickly, preferably from the command line. One common task is adding a string to the end of each line of a file. In this article, we'll explore several methods to accomplish this using various Linux commands. We'll use a sample file called language.txt throughout this article. Let's first create and populate this file − $ touch language.txt $ cat > language.txt Hindi English Chinese Spanish ^D Our goal is to append the phrase "is a good language to learn" to the end of each line in the ...

Read More

How to encrypt a large file using openssl?

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

OpenSSL is a powerful cryptographic toolkit that provides various security functions including file encryption. It comes pre-installed on most Linux distributions, but can be installed via package managers if needed. This article demonstrates how to encrypt large files using OpenSSL's public-key cryptography features. Understanding Encryption Types Before diving into file encryption, it's important to understand the two main encryption approaches: Symmetric (Secret-key) encryption − Uses the same key for both encryption and decryption Asymmetric (Public-key) encryption − Uses separate keys for encryption and decryption Public-key encryption is more secure as it eliminates key-sharing concerns, ...

Read More

How to swap two files in Linux command line?

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

As system administrators or DevOps professionals, we often need to exchange file contents. For example, you might have a backup file /etc/passwd.backup that you want to restore to /etc/passwd, while preserving the current content by moving it to the backup file. This operation is called file swapping − exchanging the actual content of two files, not their locations. When we talk about swapping two files on Linux, we mean exchanging their content while keeping their names and locations unchanged. This tutorial demonstrates practical methods to accomplish this task using command line tools. Example Files Setup Let's create ...

Read More

How to write Stdout to a file with colors?

Vishesh Kumar
Vishesh Kumar
Updated on 17-Mar-2026 997 Views

When working with command-line tools that produce colorized output, preserving these colors when redirecting to files can be challenging. By default, most programs detect when their output is redirected and strip away ANSI color codes. This article covers various methods to capture colored terminal output in files while maintaining the original formatting. Using Grep with Color Preservation The grep command searches for text patterns using regular expressions. To preserve colors when redirecting output, use the --color=always option. Syntax $ grep [options] pattern [files] Example First, create a sample file and then use ...

Read More

How to Merge PDF Files in Bash?

Vishesh Kumar
Vishesh Kumar
Updated on 17-Mar-2026 736 Views

Merging PDF files in Linux is a common task for organizing documents, reducing clutter, or preparing files for sharing. Linux provides several powerful command-line utilities specifically designed for this purpose. Each tool offers different features and syntax, making them suitable for various use cases. Available PDF Merging Tools Linux offers multiple utilities for merging PDF files − pdfunite − Part of Poppler Utils, simple and fast pdftk − PDF Toolkit with advanced features qpdf − Powerful PDF transformation utility gs (Ghostscript) − PostScript and PDF processor convert (ImageMagick) − Image manipulation tool with PDF support ...

Read More
Showing 1–9 of 9 articles
« Prev 1 Next »
Advertisements