Found 1437 Articles for Linux

Free Command in Linux

Satish Kumar
Updated on 23-Mar-2023 17:41:27

371 Views

Introduction In Linux operating system, there are many commands that can be used to get system information, manage files, and perform various other tasks. One of most commonly used commands is "free" command. This command is used to display amount of free and used memory in system. In this article, we will discuss "free" command in detail, including its usage, options, and examples. What is Free Command? The "free" command is a tool that is used to display amount of free and used memory in Linux system. This command is very useful for monitoring system performance and identifying memory-related issues. ... Read More

How to Pretty-Print XML From Command Line?

Satish Kumar
Updated on 23-Mar-2023 17:38:50

2K+ Views

XML is a commonly used format for exchanging data between systems. It is used extensively in web applications and other areas where data needs to be exchanged between different systems. However, XML can be difficult to read and understand when it is in its raw format. Pretty-printing XML is process of formatting XML in a more readable and understandable way. This article will discuss how to pretty-print XML from command line. What is Pretty-Printing? Pretty-printing is process of formatting data in a more human-readable and understandable way. In case of XML, pretty-printing involves adding whitespace and line breaks to XML ... Read More

Linux Commands – Remove All Text After X

Satish Kumar
Updated on 23-Mar-2023 17:36:32

143 Views

Introduction Linux commands are essential for operating and managing Linux-based systems. One of most common tasks that Linux administrators and users encounter is manipulating text files. In many cases, they need to remove all text after a certain point in a file, which can be a tedious and time-consuming task if done manually. Luckily, there are Linux commands that can make this process easier and more efficient. In this article, we will explore some of commands that can be used to remove all text after X, and provide examples of their usage. The Sed Command Sed, short for Stream Editor, ... Read More

Using sed to Replace a Multi-Line String

Satish Kumar
Updated on 23-Mar-2023 17:34:56

9K+ Views

Introduction Sed, or Stream Editor, is a powerful command-line tool that allows you to manipulate and transform text files. One of most common tasks that you may need to perform is to replace a multi-line string in a file with another string. In this article, we will explore how to use sed to accomplish this task. Understanding Sed's s Command Sed's s command is primary tool that you will use to perform text replacements. It takes following form − s/pattern/replacement/flags Here, pattern is a regular expression that matches text that you want to replace, replacement is text that you ... Read More

The Linux join Command

Satish Kumar
Updated on 23-Mar-2023 17:33:58

1K+ Views

Introduction Linux is an open-source operating system that provides users with a wide range of utilities and tools for managing and manipulating data. One such tool is join command, which is used to join two different files based on a common field. join command is a very useful utility that can be used to merge or join two files, where one file contains a list of unique fields and other file contains more detailed information about those fields. The Linux join command is a powerful tool that is used to merge two different files based on a common field. command ... Read More

Linux comm Command

Satish Kumar
Updated on 23-Mar-2023 17:32:12

531 Views

Introduction Linux is an open-source operating system that provides a wide range of powerful and flexible tools for managing and manipulating files and data. One of essential tools in Linux is "comm" command, which is used to compare two sorted files line by line. This command can be used to identify common lines or differences between files. In this article, we will discuss comm command, its syntax, and examples. Syntax of comm Command The syntax of comm command is as follows − comm [OPTION]... FILE1 FILE2 Here, FILE1 and FILE2 are two files that need to be compared. options ... Read More

Display System Information in CLI with Neofetch

Satish Kumar
Updated on 04-Apr-2023 16:26:37

326 Views

As a computer user, it's important to know specifications and operating system information of machine you're working with. This information can be helpful in troubleshooting issues or optimizing system for better performance. While there are many graphical user interface (GUI) tools that can display this information, there are also command-line interface (CLI) tools that can do same job. One such tool is Neofetch, a CLI system information tool that can display a variety of information about your system. In this article, we'll explore Neofetch and how it can be used to display system information in CLI. What is Neofetch? Neofetch ... Read More

How to Evaluate Arithmetic Expressions in Bash?

Satish Kumar
Updated on 23-Mar-2023 17:17:21

953 Views

Bash is a powerful programming language used for writing shell scripts on Linux and other Unix-based systems. One of most common tasks in shell scripting is evaluating arithmetic expressions. In this article, we will discuss how to evaluate arithmetic expressions in Bash and explore some examples. Introduction Arithmetic expressions are mathematical calculations performed on numerical values. In Bash, arithmetic expressions are evaluated using expr command, which evaluates a string as an arithmetic expression and returns result. syntax for expr command is as follows − $ expr expression Here, expression is arithmetic expression to be evaluated. For example, to evaluate ... Read More

How to Print Longest Line(s) in a File in Linux?

Satish Kumar
Updated on 23-Mar-2023 17:15:22

1K+ Views

Introduction Working with files is a common task for Linux users, and often, you may need to find longest line(s) in a file. While there are several ways to do this, there are a few simple methods that can make process quicker and more efficient. In this article, we will explore various methods for finding longest line(s) in a file in Linux. Method 1: Using wc Command The wc (word count) command is a useful tool that can be used to count number of lines, words, and characters in a file. However, it can also be used to find length ... Read More

When to Use xargs in Linux?

Satish Kumar
Updated on 23-Mar-2023 17:12:17

144 Views

When it comes to working with command-line utilities in Linux, there are many tools and utilities available that can make your life easier. One such utility is xargs, a command that allows you to execute commands on a list of files, or arguments, from standard input. Xargs is particularly useful when you want to perform an operation on a large number of files, and you want to do it quickly and efficiently. In this article, we will discuss various scenarios where you may need to use xargs in Linux. We will also look at some examples to illustrate how to ... Read More

Advertisements