Found 1466 Articles for Linux

How to write Stdout to a file with colors?

Vishesh Kumar
Updated on 21-Nov-2022 10:20:02

906 Views

Introduction The tools we can use to send standard output to files while maintaining their colours will be covered in this post. This is especially helpful while troubleshooting because it makes it simpler to scan the output logs thanks to the coloured areas. By Using Grep A file can be searched for text patterns or strings using the grep command. Regular expressions are the names given to the patterns. Syntax The syntax for the grep command is as follows − $ grep [options] pattern [files] Example Let's make a example.txt file by using cat command. After that we will ... Read More

How to swap two files in Linux command line?

Vishesh Kumar
Updated on 21-Nov-2022 10:17:04

2K+ Views

As system administrators or DevOps functions, many times we come with the requirement to exchange files content, for example, suppose you have a backup file of /etc/passwd by name /etc/password.backup and you want to restore the same in /etc/passwd but you also want current content of /etc/password should be copied to /etc/passwd.backup. In other words, exchange content of /etc/passwd with /etc/passwd.backup and /etc/passwd.backup with /etc/passwd. The Linux operating system's useful tools and commands enable you to achieve/accomplish a wide range of file manipulation goals. For one reason or another, you may need to swap two files in the Linux ... Read More

How to encrypt a large file using openssl?

Vishesh Kumar
Updated on 21-Nov-2022 10:15:16

2K+ Views

OpenSSL OpenSSL is a valuable tool for general-purpose cryptography and secure communication, and it does various tasks, including encrypting files. Most Linux distributions install the device by default; if not, you can install it using your package manager. Before encrypting a file using OpenSSL, let us have a basic understanding of encryption. Encryption is a method of encoding a message to protect its contents from prying eyes. There are two types in general − Symmetric or secret-key encryption Asymmetric or public-key encryption Secret-key encryption uses the same key for encryption and decryption, whereas publickey encryption uses separate keys ... Read More

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

Vishesh Kumar
Updated on 21-Nov-2022 10:08:33

2K+ Views

Introduction We occasionally need to make changes to files quickly, preferably from the command line. One example is adding a string to the end of each line of a file. In this article, we'll look at several ways to accomplish this using various Linux commands. The sample file language.txt that follows will be used throughout this article − pi@TTP:~ $ touch language.txt Example A file will be created with the name of language.txt. pi@TTP:~ $ cat > language.txt With the help of cat command with > we can insert data into the file. If we open the file language.txt you ... Read More

Docker Container Network Namespace Is Invisible

Vishesh Kumar
Updated on 21-Nov-2022 09:50:49

673 Views

This article will look at a problem with the network namespace file in a Docker container. We'll examine why the network namespace file is invisible to the ip netns ls command. Before moving ahead, let's have a brief overview of Docker, Containers and Network Namespace Containerization Containerization is similar to virtualization, in which an application and all its dependencies and libraries are packaged into a single container; it can run in any computing environment. When the OS kernel and all necessary libraries and dependencies are included in the container, anyone working on the application can use only the container to ... Read More

cURL Command Without Using Cache

Vishesh Kumar
Updated on 21-Nov-2022 09:45:02

2K+ Views

Introduction cURL (Client URL) is a command-line tool. It allows data to be transferred to or from a server without requiring user interaction by utilising the supported libcurl library. cURL can also be used to troubleshoot network connections. In some cases, we may need to send requests that bypass the cache and generate a new 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 a result, any caching ... Read More

Creating a Hex Dump of a File

Vishesh Kumar
Updated on 21-Nov-2022 09:42:30

2K+ Views

Introduction Hexdump shows the binary file contents in hexadecimal, decimal, octal, or ASCII form. It is an inspection tool that is also useful for programming, reverse engineering, and data recovery. It represents the content of a file in hexadecimal form. The various tools we can use to generate a file's hex dump will be covered in this article. We will learn to create a hex dump of a file. To utilise as a model for this article, let's generate an ASCII text file. $ cat >> example.txt This is our sample text in the file. We will convert it ... Read More

Convert Hex to ASCII Characters in the Linux Shell

Vishesh Kumar
Updated on 21-Nov-2022 09:27:21

10K+ Views

Introduction If a numbering system is represented in base 16 then it is considered to be hexadecimal. In this article we will understand to convert Hex to ASCII in the Linux Shell. The hexadecimal system uses a combination of digits and alphabetic characters, and it looks like this −0 1 2 3 4 5 6 7 8 9 A B C D E F Large digital systems are best suited for a hexadecimal numbering system since it can store and express long binary data. Because a total of 16 symbols (both digital and alphabetic, ranging from 0 to F) ... Read More

What is the difference between Gitlab and GitHub?

Muthu Annamalai Venkatachalam
Updated on 11-Oct-2022 12:45:47

360 Views

Introduction GitHub and GitLab are both open-source platforms that use the Git system for version control. Because of this, it is crucial that you select the right tool for your team. This blog aims to resolve all your project puzzles and explain the differences and similarities between GitHub and GitLab. So you can choose them accordingly What is GitHub? The geek world raves about GitHub all the time, but most people are still unaware of what GitHub actually is. In short, GitHub is a web service that helps professionals track and manage their code, as well as store and manage ... Read More

What is the Difference between Git Vs Subversion?

Muthu Annamalai Venkatachalam
Updated on 11-Oct-2022 12:43:23

364 Views

Introduction It is likely you have heard of Version Control Systems (VCS), or source control if you write or track code for a project. A Version Control System serves primarily as a host and a tool for tracking how a project develops. With VCSs, developers are able to compare and track changes between files, track commits, make proposals, view the history of projects, and revert to previous versions. Software teams and developers need a good VCS to implement DevOps, continuous delivery and maintain productivity. Git, SVN, Mercurial, and Perforce are a few of the most popular version control systems. You ... Read More

Advertisements