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 20 of 94
How to add a Column of Numbers in Bash?
Bash provides several methods to add up numeric columns in data files. This article explores different approaches including awk, loops, and text processing commands, comparing their performance on column summation tasks. Using the awk Tool The awk command is the most straightforward approach for column arithmetic. It reads each line, accumulates values, and displays the final sum. $ awk '{Total=Total+$1} END{print "Total is: " Total}' numbers.csv Total is: 49471228 To measure performance, use the time command: $ time awk '{Total=Total+$1} END{print "Total is: " Total}' numbers.csv ...
Read MoreCheck if Directory is Mounted in Bash on Linux
Checking if a directory is mounted is a common system administration task in Linux. There are several reliable methods to determine whether a specific directory serves as a mount point, each with different advantages and use cases. Using the mount Command The mount command is the most traditional method to check mounted filesystems. To check if a specific directory is mounted, combine it with grep − mount | grep "/mnt/data" If the directory is mounted, this returns information about the mount point, filesystem type, and source device. If not mounted, no output is displayed. ...
Read More8 Best KDE Based Linux Distributions That You\'ll Love
KDE is one of the most popular and user-friendly desktop environments for Linux users. With its modern and sleek interface, it has won the hearts of many Linux enthusiasts. However, with so many KDE-based Linux distributions available, it can be challenging to decide which one to choose. In this article, we will explore the 8 best KDE-based Linux distributions that offer excellent performance, stability, and user experience. 1. Kubuntu Kubuntu is the official Ubuntu flavor that uses KDE Plasma as its desktop environment. Built on Ubuntu's solid foundation, it provides excellent hardware compatibility and a vast software repository. ...
Read More10 Cool Command Line Tools For Your Linux Terminal
As a Linux user, you might have heard that the command line is the true power of Linux. While graphical user interfaces can be useful, the command line offers more control and flexibility. There are many command line tools available for Linux that can make your life easier and improve your productivity. In this article, we will explore 10 cool command line tools for your Linux terminal. The Grep Command The grep command is a powerful tool for searching text files. It allows you to search for specific words or patterns in a file or multiple files. The ...
Read More10 Best Linux Server Distributions of 2023
Linux has established itself as the preferred operating system for server deployments, offering unmatched reliability, security, flexibility, and cost-effectiveness. With numerous distributions available, selecting the right one for your organization requires careful consideration of specific requirements and use cases. Enterprise-Grade Distributions Red Hat Enterprise Linux (RHEL) RHEL remains the gold standard for enterprise server deployments. Built for mission-critical applications, it provides 10-year lifecycle support, certified hardware compatibility, and comprehensive security features. RHEL excels in environments requiring regulatory compliance and enterprise-grade support with guaranteed SLAs. SUSE Linux Enterprise Server (SLES) SLES offers robust enterprise features with ...
Read MoreHow to Delete a Git Branch Remotely and Locally?
Git is a distributed version control system that helps developers manage changes and collaborate on projects efficiently. Git branches provide a way to work on different parts of the same project concurrently without interfering with each other's code. Branches serve as separate instances of a project, with their own commit histories and codebases. This allows multiple developers to work on the same file simultaneously without affecting each other's work. It also enables testing new features before integrating them into the main project, allowing developers to experiment with new ideas without compromising the stability of existing code. Git Branches ...
Read MoreHttps connection using curl on Linux
curl is a versatile command-line tool that supports various protocols including HTTPS for secure web connections. It enables users to transfer data from or to servers and is commonly used for connecting to web servers and retrieving data. This tutorial covers how to use curl to make secure HTTPS connections and handle SSL/TLS certificates properly. What is Curl? Curl is a command-line tool that allows users to transfer data from or to a server using various protocols, including HTTP, HTTPS, FTP, and more. It supports many different types of websites and can be used to connect to any ...
Read MoreMapping Hostnames with Ports in /etc/hosts
The /etc/hosts file is a simple text file used to map hostnames to IP addresses locally on a system. It provides hostname resolution by bypassing DNS servers, allowing administrators to define custom IP-to-hostname mappings. Each line represents a single mapping with the IP address followed by one or more hostnames separated by spaces. Understanding the Hosts File Structure The hosts file is located at /etc/hosts on Unix-like systems and C:\Windows\System32\drivers\etc\hosts on Windows. It follows a simple format where each line contains an IP address followed by hostnames: 192.168.1.100 myserver.local 127.0.0.1 localhost ::1 localhost When ...
Read MoreCreate a file of certain size in Linux
When using Linux, we often need to create files of specific sizes for testing, development, or system administration tasks. This is particularly useful for testing disk space, creating dummy files for benchmarking, or generating placeholder files of predetermined sizes. There are several efficient methods to achieve this using built-in Linux commands. Each method has its own advantages depending on the specific use case and performance requirements. Available Methods Linux provides multiple utilities for creating files of specific sizes, each with distinct characteristics: Command Speed File Content Best Use Case ...
Read MoreNegate an if Condition in a Bash Script in Linux
To negate an if condition in a Bash script in Linux, you can use the ! operator (logical NOT). This operator reverses the truth value of a condition — if the condition would normally be true, negation makes it false, and vice versa. For example, instead of checking if [ $x -eq 5 ], you can use if [ ! $x -eq 5 ] to execute commands when the variable is not equal to 5. Basic Negation Syntax The ! operator is placed inside the test brackets, immediately after the opening bracket: if [ ! condition ...
Read More