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
Articles on Trending Technologies
Technical articles with clear explanations and examples
Difference between User-CPU-Time and System-CPU-Time in UNIX
In UNIX-based operating systems, such as Linux, there are two types of CPU time that are commonly measured: user CPU time and system CPU time. These metrics provide insights into how the CPU resources are being utilized by different components of a system or process. Understanding the difference between user CPU time and system CPU time is essential for performance analysis and troubleshooting. CPU Time in UNIX Systems User Mode Application Code Library Functions User Calculations ...
Read MoreHow to converts tabs to spaces in the Linux system?
While working with files, sometimes we encounter situations where a file contains many tabs and the requirement is to have spaces instead. For simple files, this conversion is easy, but for large files with numerous tabs, manual conversion becomes very difficult. This is where the expand command becomes essential. The expand command in Linux is used to convert tabs to spaces. If no file is specified, the expand command reads from standard input and processes the text accordingly. Syntax The general syntax of the expand command is as follows − expand [OPTION]... [FILE]... ...
Read MoreStarvation and Deadlock
Starvation and Deadlock are situations that occur when processes requiring resources are delayed for a long time. However, they are quite different concepts with distinct causes and solutions. Starvation Starvation occurs when a process is indefinitely postponed from accessing resources or CPU time it needs for execution. The process remains ready to run but never gets the opportunity to proceed, potentially waiting forever. Process Starvation Scenario High Priority P1 High Priority P2 Low Priority P3 (Starving) ...
Read MoreFind all links for a specific file on Linux
In Linux, finding all links for a specific file is a common administrative task. A link in Unix/Linux systems is an association between two different files or directories. When you create a link, it creates a new name for the original file. There are two types of links: hard links (multiple names for the same inode) and symbolic links (shortcuts that point to another file path). Setup Example Let's start with a practical example. We have a file1.txt document and several symbolic links pointing to it from different locations: [tpoint@server1:~/test]$ ls -lrth total 12K -rw-r--r-- 1 tpoint ...
Read MoreExecute Bash Script Directly From a URL
Bash scripting is a powerful way of automating repetitive tasks and executing complex commands with a single script. With increasing popularity of web-based technologies, it's now possible to execute Bash scripts directly from a URL. This opens up new possibilities for web developers and system administrators who need remote script execution capabilities. What is Bash Scripting? Bash scripting is a type of scripting language commonly used on Unix-based systems such as Linux and macOS. Bash stands for Bourne-Again SHell, and it's a command-line interface that allows users to interact with the operating system by executing commands. Bash scripts ...
Read More20 Useful Terminal Emulators for Linux
Terminal emulators are an essential part of the Linux ecosystem, providing users with a way to interact with the command line and execute commands. While the command line may seem daunting to some users, the benefits of using a terminal emulator are immense. Terminal emulators provide advanced users with complete control over their Linux operating system, and can help novice users learn Linux command line. In this article, we will explore 20 of the most useful terminal emulators for Linux, highlighting their key features and benefits. Desktop Environment Default Terminals GNOME Terminal GNOME Terminal is the default ...
Read MoreHow to Disable NetworkManager in CentOS/RHEL 8?
NetworkManager is a daemon that manages network connections on Red Hat Enterprise Linux (RHEL) and CentOS systems. It handles both wired and wireless connections, including Ethernet, WiFi, mobile broadband, VPNs, and other network interfaces. The daemon provides a graphical user interface for managing network settings on desktop environments such as GNOME or KDE. NetworkManager is designed to automatically detect and configure connections based on the available network devices and their properties. It uses mechanisms like DHCP (Dynamic Host Configuration Protocol), PPP (Point-to-Point Protocol), and static IP addresses to connect to networks dynamically. Additionally, it supports advanced features like bonding ...
Read MoreHow to copy a file, group of files, or directory in Linux?
The cp command is used to copy files or directories in Linux/Unix systems. It allows you to duplicate files from a source location to a destination directory. By default, cp works with files only − to copy directories, you must use the -R (recursive) option. Syntax The general syntax of the cp command is as follows − cp [OPTION]... [-T] SOURCE DESTINATION cp [OPTION]... SOURCE... DIRECTORY cp [OPTION]... -t DIRECTORY SOURCE... Common Options Option Description -R, -r, --recursive Copy directories recursively -i, --interactive Prompt ...
Read MoreMonitors vs Semaphores
Monitors and semaphores are synchronization mechanisms used to control process access to shared resources through mutual exclusion. While both achieve process synchronization, they differ significantly in their implementation, usage complexity, and error handling capabilities. Monitors Monitors are high-level synchronization constructs designed to overcome timing errors and programming complexity associated with semaphores. They are abstract data types that encapsulate shared data variables and procedures within a single unit. In a monitor, shared data variables cannot be accessed directly by processes. Instead, processes must use the monitor's procedures to interact with the shared data. Only one process can be ...
Read MoreCreate bash alias that accepts parameters
When working with Bash scripts or Unix/Linux command line tools, we often write the same command lines over and over again. Often, these command lines are long and must be repeated multiple times. For instance, when logging into a remote server daily, copying a local folder to the remote server, or searching for hidden files or directories within a directory. You can create aliases using the alias command. In this guide, I will show you how to create an alias that accepts parameters on Linux. This is useful if you want to run a single command repeatedly without having ...
Read More