Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
-
Economics & Finance
Open Source Articles
Page 23 of 123
How to investigate which process causes wakeups during laptop sleep-mode in MacOS (or Linux)
When a laptop goes into sleep mode, the operating system tries to conserve power by stopping most processes and putting the computer in a low-power state. However, sometimes a process may continue to run or periodically wake up the computer, preventing it from entering a deep sleep state. This can lead to increased power consumption and 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 diving into how to investigate sleep mode wakeups, it's important to understand the power ...
Read MoreRepeat a Linux Command at a Given Interval
Linux is a powerful operating system that offers a wide range of command-line tools for executing various tasks. One task that often needs 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 automated backups. In this article, we will explore how to repeat a Linux command at a given interval. We will discuss various methods to achieve this, including using the cron utility, watch command, sleep command, and other scheduling tools. Using Cron to Repeat a Command ...
Read MoreHow to End Processes With kill, pkill, and killall
When working with a Unix-based operating system such as Linux or macOS, it is common to encounter situations where a process becomes unresponsive or needs to be terminated for some reason. Fortunately, there are several command-line utilities available that allow users to end processes in a variety of ways. In this article, we will explore three of the most commonly used utilities for terminating processes: kill, pkill, and killall. We will cover their basic usage, common options, and examples of how they can be used to manage processes on a Unix system. Basic Usage of kill, pkill, and killall ...
Read MoreHow to Get the Path of a Linux Command?
A Linux command that you run from a terminal window can be built-in (a part of the system), a function (an application that runs when you enter certain commands), an alias (another name for a command), or an external executable (a program that you download). You can use the which, command, whereis, whatis, and type tools to determine what each one is and where they are located. We will look at the which, command, type, and whereis commands as they are usually found in most Linux-based operating systems. PATH Environment Variable Before we get into the details ...
Read MoreHow to download a Tarball from GitHub on Linux?
GitHub is an online source code repository and hosting service for open-source projects that provides version control, collaboration, and project management features. Downloading tarballs (compressed archive files) from GitHub allows you to get the source code without cloning the entire repository history. There are several methods to download a tarball from GitHub on Linux systems. The most common approaches use command-line tools like wget and curl to fetch repository archives directly from GitHub's servers. Using wget Command wget is a dedicated non-interactive network download tool that supports HTTP and HTTPS protocols. It's perfect for downloading repository archives ...
Read MoreHow to replace string in a large one line, text file in Linux?
Some software reads an entire input file into memory before processing it. If the input file contains a very long single-line string, the software may crash due to insufficient memory to hold the entire string. We'll examine methods to replace strings in very large one-line files in Linux. Since some applications cannot handle extremely large single-line files efficiently, we need specialized approaches that don't load the entire file into memory at once. Target File Modern JavaScript frameworks often compress all code into a single line. Consider a one-line JavaScript file called original.js with an error — it ...
Read MoreFastest Method to Check If Two Files Have Same Contents
In today's era of technological advancements, use of computers and various electronic devices has become an essential part of our daily routine. We often find ourselves in situations where we need to compare two files to check if they contain same content or not. This can be a daunting task, especially if files are large in size, and traditional comparison methods can be quite time-consuming. In this article, we will explore fastest methods to check if two files have same contents. What is a File Comparison? A file comparison is a process of comparing two or more files ...
Read MoreHow to Pretty-Print XML From Command Line?
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 the process of formatting XML in a more readable and understandable way. This article will discuss how to pretty-print XML from the command line. What is Pretty-Printing? Pretty-printing is the process of formatting data in a more human-readable and understandable way. In the case of XML, pretty-printing involves adding ...
Read More20 Things To Do After Installing Ubuntu 22.10 'Groovy Gorilla'
Ubuntu 22.10 'Kinetic Kudu' brings exciting features and improvements to the Linux desktop experience. After installation, there are essential configurations and applications to install that will optimize your system and enhance productivity. This guide covers 20 important steps to get the most out of your fresh Ubuntu installation. 1. Install System Updates The first priority is updating your system to ensure you have the latest security patches, bug fixes, and feature improvements. Open the Software Updater application or use the terminal − sudo apt update && sudo apt upgrade 2. Install Additional Hardware Drivers ...
Read More20 Useful IPtable Firewall Rules Every Linux Administrator Should Know
As a Linux administrator, one of the most important aspects of maintaining a secure and stable network is implementing an effective firewall. IPtables is a powerful firewall tool that comes pre-installed on most Linux distributions. In this article, we will explore 20 useful IPtables firewall rules that every Linux administrator should know. These rules will help you secure your network and prevent unauthorized access, while also allowing legitimate traffic to pass through. Block All Incoming Traffic Except SSH The first rule is to block all incoming traffic except for SSH. SSH is a secure way to access your ...
Read More