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
Https 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 MorePrint Lines Between Two Patterns in Linux
Printing lines between two patterns is a common text processing task in Linux when you need to extract specific sections from files. While the grep command can find lines matching patterns, it cannot easily extract content between two different patterns. For this purpose, sed and awk commands provide powerful pattern-matching capabilities. This article demonstrates various methods to print lines between two patterns using sed and awk commands with different conditions and filtering options. Sample File Setup First, let's create an example file to demonstrate the pattern matching techniques − cat example.txt Information ...
Read MoreConfiguring Squid Proxy Server with Restricted Access and Setting Up Clients to Use Proxy
Are you looking to configure a Squid Proxy Server with restricted access and set up clients to use the proxy? Squid is a powerful caching proxy server that provides network performance optimization, security filtering, and access control capabilities for organizations. What is Squid Proxy Server? Squid Proxy Server is a popular open-source proxy server that improves network performance and security by caching and filtering web content. It acts as an intermediary between clients and web servers, allowing administrators to control internet access, block specific websites, and monitor network traffic. Installing Squid Proxy Server Install Squid Proxy ...
Read MoreHow to replace spaces in file names using bash script on Linux?
Consider a case in which one directory on my local machine looks something like this − immukul@192 dir1 % ls -ltr total 0 -rw-r--r-- 1 immukul staff 0 Jul 3 20:44 sample code.txt -rw-r--r-- 1 immukul staff 0 Jul 3 20:44 sample code with love.txt In the above directory named dir1, there are two .txt files present and both these files have spaces in between the words in their name, and we need to replace these spaces using a bash script on Linux. In order to achieve what we want, we must first be aware ...
Read MoreConvert Hex to ASCII Characters in the Linux Shell
Hexadecimal (Hex) is a base-16 numbering system that uses digits 0-9 and letters A-F to represent values. Converting hex to ASCII characters is a common task in Linux systems, especially when dealing with encoded data, network protocols, or binary file analysis. Hex digits: 0 1 2 3 4 5 6 7 8 9 A B C D E F ASCII (American Standard Code for Information Interchange) is a character encoding standard that represents text in computers and communication equipment. Each ASCII character corresponds to a specific numeric value that can be expressed in hexadecimal format. ...
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 More8 Best Linux Console File Managers
If you're a Linux user, you may be familiar with the console, which is a command-line interface that allows you to interact with your operating system using text commands. While many Linux users prefer graphical user interfaces, console file managers can be more efficient and powerful for file management tasks. These tools allow you to navigate, copy, move, and delete files and directories using a text-based interface. In this article, we'll explore eight of the best console file managers for Linux. Midnight Commander (MC) Midnight Commander is a classic console file manager that has been around for over ...
Read More10 Cool Software to Try from COPR Repo in Fedora
If you're a Fedora user, you might be familiar with the standard software repositories available in the Fedora distribution. However, there is a lesser-known repository called COPR that offers users access to a vast collection of cool and useful software. In this article, we'll explore what COPR is, how to use it, and some of the most interesting software available in the COPR repo for Fedora. What is COPR? COPR stands for "Cool Other Package Repo". It's a community-driven software repository system developed by Fedora users to offer alternative software packages that may not be available in the ...
Read More