Found 1437 Articles for Linux

How to Zip a File in Linux?

Satish Kumar
Updated on 17-Jul-2023 15:26:08

3K+ Views

Introduction Linux, the popular open-source operating system, comes with a set of useful tools and commands that you can leverage for everyday tasks. One such task is file compression, and Linux provides various methods to zip or compress files and directories. This guide will walk you through how to zip a file in Linux using commands like 'gzip', 'zip', and 'tar'. Using the 'gzip' Command 'gzip' (GNU zip) is a widely-used command for file compression in Linux. Here is an example of how to use it − gzip filename.txt This command will compress the file 'filename.txt' and rename it ... Read More

How to Write Scripts Using Awk Programming Language?

Satish Kumar
Updated on 17-Jul-2023 15:24:53

74 Views

Awk is a powerful text-processing language named after its three original authors: Alfred Aho, Peter Weinberger, and Brian Kernighan. It's a versatile language primarily used for pattern scanning and processing. Awk is a staple of Unix scripting and is commonly used for tasks like data extraction, reporting, and data transformation. Awk scripts are quick to write and perform well for small to medium-sized tasks. In this article, we will introduce you to the basics of writing scripts using the Awk programming language. Basic Syntax An Awk program consists of a sequence of pattern-action pairs, written as − pattern { action ... Read More

How to Work With GitHub Flavored Markdown in Linux?

Satish Kumar
Updated on 17-Jul-2023 16:46:09

139 Views

Markdown is a popular lightweight markup language that allows users to write using an easy−to−read and easy−to−write plain text format, which can then be converted into HTML or other formats. In essence, it simplifies the process of structuring and formatting text. GitHub Flavored Markdown (GFM) is a variant of Markdown used by GitHub, incorporating additional features that help developers to document their work. In this article, we're going to delve into how to work with GitHub Flavored Markdown on a Linux system, with practical examples and their output. Basics of GitHub Flavored Markdown Let's start with the basics of GFM. ... Read More

How To Work With Ansible Variables And Facts?

Satish Kumar
Updated on 17-Jul-2023 16:48:34

337 Views

Ansible is a widely−used open−source tool that helps in automating software provisioning, configuration management, and application deployment. One of its powerful features is the ability to use variables and facts, which can simplify your playbooks and tasks, and allow you to design more dynamic, flexible, and reusable automation scripts. In this article, we'll dive into how to work with Ansible variables and facts, showcasing several examples and their corresponding output. Understanding Ansible Variables Variables in Ansible allow for the storage and manipulation of values, which can be utilized across multiple tasks or even different playbooks. Variables can be defined in ... Read More

Installing PIP on Linux to Manage Python Packages

Siva Sai
Updated on 17-Jul-2023 14:23:18

1K+ Views

Python is probably one of the most used programming languages in the tech-driven world of today. The language is popular among developers all around the world because it is flexible, effective, and provides a wide range of third-party modules. PIP is a key element that facilitates Python package management. This post serves as a thorough tutorial for setting up PIP on Linux to manage Python packages. It is filled with useful examples to help you understand. Introduction to PIP The package management system PIP, which stands for "Pip Installs Packages, " is used to install and manage Python software packages. ... Read More

Mutex lock for Linux Thread Synchronization

Diksha Patro
Updated on 14-Jul-2023 16:44:42

836 Views

Introduction In Linux, mutex locks are used for thread synchronization, allowing threads to safely access shared resources and avoid data races. A mutex, short for mutual exclusion, ensures that only one thread can acquire the lock at a time, preventing concurrent access to the critical section. In this article, we will be talking about the use cases, components, and examples of Mutex lock for Linux Thread Synchronization. Why do we need Mutex lock for Linux Thread Synchronization? When utilizing mutex locks over thread synchronization, the mutex must first be initialized before the crucial phase is executed, then a ... Read More

Difference Between GZIP and TAR

Md. Sajid
Updated on 13-Jul-2023 19:14:06

2K+ Views

GZIP and TAR are two independent tools that serve different purposes but are widely used together to create compressed archive files on Unix and Linux systems. GZIP is a common compression technique and file format for compressing individual files. The TAR (Tape Archive) file archiving program is widely used on Unix and Linux systems Read this article to find out more about GZIP and TAR and how they are different from each other What is GZIP? GZIP is a common compression technique and file format for compressing individual files. It is commonly used in Unix and Linux systems, and its ... Read More

How to Use the dmesg Linux Command?

Satish Kumar
Updated on 13-Jul-2023 16:55:17

293 Views

The dmesg command is a powerful tool in the Linux command−line arsenal. It stands for "diagnostic message" and is used to read and write data from/to the kernel ring buffer, a data structure that holds messages about the system's hardware, kernel, or driver messages. This article will guide you through the usage of the dmesg command, complete with examples and their outputs. Basic Usage The most basic usage of the dmesg command is to simply type dmesg into your terminal and hit enter. This will display all the kernel messages in your terminal. $ dmesg The output will be ... Read More

How To Use The Bash read Command?

Satish Kumar
Updated on 13-Jul-2023 17:42:28

3K+ Views

The read command is one of the most fundamental commands in Bash scripting. It is used to read input from the user or from a file. In this article, we will explore how to use the read command effectively, with several examples and their output. Basic Usage of read Command The most basic usage of the read command is to take input from the user. Here's a simple example − Example echo "Please enter your name: " read name echo "Hello, $name" When you run this script, it will prompt you to enter your name. After you enter your ... Read More

How to Use the Apt-Get Command in Linux?

Satish Kumar
Updated on 13-Jul-2023 16:44:18

4K+ Views

The Advanced Packaging Tool, or APT, is a powerful command-line tool used in Debian based systems like Ubuntu, Linux Mint, and others. The apt−get command is one of the most common ways to interact with APT. It's used to handle packages, allowing you to install, upgrade, and remove software on your Linux system. In this guide, we'll walk you through the basics of using the apt−get command, complete with examples and their outputs. 1. Updating Package Lists: apt−get update The first command you should know is apt−get update. This command retrieves information about the newest versions of packages and their ... Read More

Advertisements