Found 1437 Articles for Linux

Repeat a Linux Command at a Given Interval

Satish Kumar
Updated on 14-Mar-2023 16:25:57

10K+ Views

Linux is a powerful operating system that offers a wide range of command-line tools for executing various tasks. One of tasks that often need to be performed is repeating a command at a given interval. This feature can be useful for several reasons, such as monitoring system performance, running scheduled tasks, and performing backups. In this article, we will explore how to repeat a Linux command at a given interval. We will discuss various ways to achieve this, including using cron utility, watch command, and sleep command. Using Cron to Repeat a Command The cron utility is a time-based job ... Read More

Recursive Search and Replace in Text Files in Linux

Satish Kumar
Updated on 14-Mar-2023 16:25:11

2K+ Views

One of most basic and frequently performed tasks in any operating system is search and replace. This becomes even more crucial when working with text files, where multiple instances of same word or phrase may be scattered throughout document. In such cases, manually editing each instance can be both time-consuming and error-prone. In this scenario, a tool like Recursive Search and Replace in Linux comes in handy. In Linux, Recursive Search and Replace can be done via various methods. most common one involves use of command-line tools like Sed, Awk, and Perl. These tools are efficient, lightweight, and have been ... Read More

Save Modifications In-Place with AWK

Satish Kumar
Updated on 14-Mar-2023 16:24:37

519 Views

Introduction The awk command is a versatile tool used in Unix and Linux environments for text processing and manipulation. One of its key features is ability to modify files in-place, which is particularly useful when working with large datasets. In this article, we will explore how to save modifications in-place with awk, including examples and subheadings to aid understanding. Understanding Awk Before we delve into how to save modifications in-place with awk, it's important to understand what awk is and how it works. Awk is a programming language designed for processing text files, with primary focus on processing rows of ... Read More

CMake configure fails to find Qt5 on Linux

Satish Kumar
Updated on 14-Mar-2023 16:22:42

2K+ Views

Introduction CMake is an open-source cross-platform tool used for building, testing and packaging software. It is widely used in industry for its portability and ability to generate build scripts for various build systems such as make, ninja, etc. Qt is a cross-platform application development framework that is widely used in creating GUI applications. In this article, we will discuss a common issue that developers face while configuring a CMake project on Linux, i.e. "CMake configure fails to find Qt5". Understanding Issue When we configure a CMake project with Qt5, CMake needs to find Qt5 package, which includes required libraries, header ... Read More

How to investigate which process causes wakeups during laptop sleep-mode in MacOS (or Linux)

Satish Kumar
Updated on 14-Mar-2023 16:20:27

1K+ Views

When a laptop goes into sleep mode, operating system tries to conserve power by stopping most processes and putting computer in a low-power state. However, sometimes a process may continue to run or periodically wake up computer, preventing it from entering a deep sleep state. This can lead to increased power consumption and a shorter battery life. In this article, we'll explore how to investigate which process is causing wakeups during laptop sleep-mode in MacOS or Linux. Understanding Power Management Subsystem Before we dive into how to investigate sleep mode wakeups, it's important to understand power management subsystem in your ... Read More

ELF executable file many zero bytes

Satish Kumar
Updated on 14-Mar-2023 16:19:33

346 Views

Introduction In world of computer programming, an ELF (Executable and Linkable Format) file is a binary file format used in Unix-based operating systems such as Linux, FreeBSD, and Solaris. These files contain executable code and data, which are used to launch programs and libraries. In some cases, however, ELF files may contain many zero bytes. In this article, we will explore why ELF files may contain many zero bytes, their impact on programs, and how to fix this issue. Why ELF files contain many zero bytes? An ELF file consists of a header followed by sections containing executable code, data, ... Read More

PDF generation from XHTML in a LAMP environment

Satish Kumar
Updated on 14-Mar-2023 16:18:27

230 Views

The LAMP environment is widely used for web development, and it is an acronym for Linux, Apache, MySQL, and PHP. This environment is an open-source platform that is easy to use and deploy. PDF format is commonly used for sharing and exchanging documents over internet. However, generating PDF documents can be a challenging task in a LAMP environment, especially when converting XHTML documents. In this article, we will explore different methods used for PDF generation from XHTML in a LAMP environment. What is XHTML? XHTML stands for Extensible Hypertext Markup Language, which is a markup language that is used to ... Read More

Installing Java on Linux using SSH

Satish Kumar
Updated on 14-Mar-2023 17:07:27

1K+ Views

Java is a popular programming language that is widely used for developing various types of software applications. Linux is one of most popular operating systems used for software development due to its stability, security, and open-source nature. In this article, we will discuss how to install Java on Linux using SSH. SSH (Secure Shell) is a secure network protocol used for remote login to a server. It allows users to log in to a remote server and perform various operations using command-line tools. This makes it an excellent choice for installing Java on a Linux machine. We will be using ... Read More

Will linux emit event when monitor connect with D-sub connector

Satish Kumar
Updated on 14-Mar-2023 16:05:37

167 Views

Introduction Linux is an open-source operating system that is popular among developers and system administrators. It is known for its flexibility, reliability, and security features. One of features that make Linux stand out from other operating systems is its ability to interact with various hardware components seamlessly. In this article, we will discuss whether Linux emits events when a monitor is connected with a D-sub connector. We will explore various methods that can be used to detect and manage connection of monitors to Linux-based systems. What is D-sub connector? Before we dive into details of how Linux interacts with monitors ... Read More

Advantages of using JNA over process execution

Satish Kumar
Updated on 14-Mar-2023 16:00:59

276 Views

Introduction Java Native Access (JNA) is a Java library that provides an interface for accessing native code from Java programs. It enables developers to use functionality of native libraries or applications without need to write native code or deal with complexity of C or C++ programming languages. On other hand, process execution refers to creation of new processes in operating system. In this article, we will discuss advantages of using JNA over process execution, along with some examples. Improved Performance One of main advantages of using JNA over process execution is improved performance. When using process execution, a new process ... Read More

Advertisements