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 by Satish Kumar
Page 45 of 94
How to Clear Linux terminal screen?
The Linux terminal is an essential tool for system administration and daily tasks. During extended terminal sessions, the screen can become cluttered with output from various commands, making it difficult to focus on current work. Clearing the terminal screen helps maintain a clean workspace and improves productivity. Linux provides several methods to clear the terminal screen, each with different behaviors and use cases. Let's explore the most effective approaches. Using the clear Command The clear command is the most common method to clear the terminal screen. It removes all visible text and positions the cursor at the ...
Read MoreThe Linux join Command
The Linux join command is a powerful text processing utility that merges two sorted files based on a common field. It reads the contents of two files and combines lines that share the same value in a specified field, creating a unified output. This command is particularly useful for database-like operations, combining related data from multiple sources, and creating reports from structured text files. Syntax The basic syntax for the join command is − join [options] file1 file2 Key Options Option Description -t CHAR Specify delimiter ...
Read MoreBest Whiteboard Applications for Your Linux Systems
Whiteboards are essential tools for facilitating brainstorming sessions and collaborating with team members in a digital workspace. With the advent of technology, physical whiteboards are gradually becoming obsolete, as they are being replaced by digital whiteboard applications. If you are using a Linux system, you may be wondering what the best whiteboard applications are. In this article, we will discuss the best whiteboard applications for your Linux systems, along with their features, advantages, and disadvantages. OpenBoard OpenBoard is a free and open-source interactive whiteboard software that is available for Linux systems. It is designed for use in educational ...
Read More5 Best Vi/Vim-Inspired Code Editors for Linux
Vi/Vim-inspired code editors combine the power and efficiency of traditional Vi/Vim with modern graphical interfaces and enhanced features. While Vi and Vim remain popular among developers for their powerful command-line capabilities, many users prefer editors that offer similar functionality with more accessible interfaces and modern conveniences. 1. Neovim Neovim is a modernized fork of Vim designed to be faster, more stable, and extensible. It maintains full compatibility with existing Vim plugins and configurations while introducing significant improvements. Key Features Built-in terminal emulator for executing shell commands without leaving the editor Lua scripting support as an ...
Read MoreHow to solve "Unary operator expected" errors?
The "unary operator expected" error is a common syntax error in Bash scripting that occurs when a conditional expression lacks the required operands. This typically happens when variables are empty or undefined, causing the shell to receive fewer arguments than expected for comparison operations. What Causes the Error? The error occurs when Bash encounters a comparison operator with missing or empty operands. Let's examine a script that demonstrates this issue − #!/bin/bash read -p "Enter the input: " num1 if [ $num1 -eq 1 ] then echo "Number entered is 1" else ...
Read MoreUsing sed to Replace a Multi-Line String
Sed (Stream Editor) is a powerful command-line tool used for parsing and transforming text in files or streams. While sed operates line-by-line by default, it can be configured to handle multi-line string replacements through special commands and pattern space manipulation. Understanding Sed's Basic Syntax The fundamental structure of sed's substitute command is: s/pattern/replacement/flags Where pattern is a regular expression matching the text to replace, replacement is the new text, and flags modify the command's behavior (such as g for global replacement). Multi-Line String Replacement Technique To replace multi-line strings, sed must load ...
Read MoreDifference Between sh and Bash in Linux?
sh and bash are both command-line shells used in Unix-like operating systems, but they serve different purposes and have distinct capabilities. sh (Bourne shell) is the original POSIX-compliant shell, while bash (Bourne Again Shell) is an enhanced, feature-rich successor that extends sh's functionality. What is sh? The sh shell, originally developed by Stephen R. Bourne at Bell Labs, is the standard POSIX shell specification. It provides a minimal, portable command-line interface that works consistently across different Unix systems. sh focuses on compatibility and standardization, making it ideal for writing portable scripts. #!/bin/sh echo "This is a ...
Read MoreWhat happens to Open File Handle if file is Moved or Deleted?
When working with files that have open handles, understanding how operating systems behave during file operations like deletion, moving, or replacement is crucial. This behavior depends on how filesystems manage inodes and file references internally. Understanding Files and Inodes In Linux filesystems, files are tracked using inode numbers rather than filenames. A filename is essentially a hard link that points to an inode containing the actual file data and metadata. $ touch inode_example $ stat inode_example File: inode_example Size: 0 ...
Read MoreLinux Commands – Remove All Text After X
Linux commands provide powerful tools for text manipulation, including the ability to remove all text after a specific character or pattern. This is a common task when processing log files, configuration files, or any text data where you need to truncate content at a certain point. The Sed Command Sed (Stream Editor) is one of the most versatile tools for text manipulation in Linux. To remove all text after a specific character X, use the following syntax: sed 's/X.*/X/' filename This command removes everything after the first occurrence of X while preserving X itself. ...
Read MoreBleachBit – A Free Disk Space Cleaner
If you're someone who's always on their computer, you know how quickly files and data can accumulate. Your device's storage capacity may seem endless at first, but it's not long before you're faced with the dreaded "low disk space" notification. This is where disk space cleaners come in. BleachBit is a free and open-source disk space cleaner known for its simplicity and efficiency. What is BleachBit? BleachBit is a disk space cleaner designed to free up space on your computer's hard drive. It's available for Windows, macOS, and Linux operating systems, and it's completely free to download and ...
Read More