Articles on Trending Technologies

Technical articles with clear explanations and examples

CSS units – %, em, rem, px, vh, vw

Abhishek
Abhishek
Updated on 15-Mar-2026 1K+ Views

CSS units determine how we measure and size elements on web pages. The most commonly used units include pixels (px), em, rem, percentages (%), and viewport units (vh, vw). Each unit has specific use cases and behaviors that affect responsive design and accessibility. Syntax selector { property: value unit; } Absolute Units Pixels (px) Pixels are fixed-size units representing the smallest display unit. While reliable for precise control, they don't scale with user preferences or viewport changes − .px-box ...

Read More

How to convert DOS/Windows newline (CRLF) to Unix newline (LF) in a Bash script?

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 2K+ Views

When transferring files between Windows and Unix systems, you'll often encounter issues with end-of-line characters. Windows uses CRLF (Carriage Return + Line Feed) while Unix uses LF (Line Feed) only. This guide shows three methods to convert Windows line endings to Unix format using Bash. Understanding the Problem Windows files use \r (CRLF) for line endings, while Unix systems use (LF). When viewing Windows files on Unix, you may see ^M characters at the end of each line. Method 1: Using dos2unix The dos2unix command is specifically designed for this conversion and comes pre-installed on ...

Read More

Linux WC Command Examples to Count Number of Lines, Words, Characters

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 574 Views

The wc command (word count) is a fundamental Linux utility for counting lines, words, characters, and bytes in files. It's commonly used with the -l option for line counting, but offers several other counting options through various arguments. Available Options Option Command Function 1 wc -c Display number of bytes 2 wc -m Display number of characters 3 wc -w Display number of words 4 wc -l Display number of lines 5 wc -L Display length of longest line ...

Read More

What are the different utility classes in Materialize CSS?

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 436 Views

Materialize CSS is a popular front-end development framework that offers various features and utilities to create responsive and appealing web applications. One of the essential components of Materialize CSS is its utility classes, which provide an easy and efficient approach to adding styles to HTML elements without writing custom CSS. Utility classes are predefined CSS classes that can be applied to any HTML element to achieve specific styling effects quickly and consistently. Types of Utility Classes Color utility classes − for text and background colors Alignment utility classes − for text and element positioning Hiding/showing content ...

Read More

How to Search and Remove Directories Recursively on Linux?

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 597 Views

Removing directories is a regular process for anyone working on Unix systems. But sometimes we also need to find the directories first and then decide to delete them. One hurdle in deleting directories is doing recursive deletion because by default Unix systems do not allow deleting of a directory if it is not empty. In this article we will see how to find and remove directories recursively using two effective methods. Using find and exec The find command with -exec searches for directories and executes the removal command directly. This method is efficient for finding and deleting directories ...

Read More

Use of :even and :odd pseudo-classes with list items in CSS

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 6K+ Views

CSS :nth-child(odd) and :nth-child(even) pseudo-classes are used to select alternative child elements. These pseudo-classes work with list items to create alternate styling like text color and background, which improves readability and visual organization. Syntax /* Select odd-positioned elements */ selector:nth-child(odd) { property: value; } /* Select even-positioned elements */ selector:nth-child(even) { property: value; } CSS :nth-child(odd) Pseudo-Class The :nth-child(odd) pseudo-class selects elements that are at odd positions (1st, 3rd, 5th, etc.) within their parent container. Example In this example, we use :nth-child(odd) to ...

Read More

How to Re-run Last Executed Commands in Linux?

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 379 Views

Re-running commands in the Linux terminal is a common task that saves time and effort. Linux provides several built-in methods to execute previously run commands without retyping them. Understanding these shortcuts improves productivity when working with the command line. Viewing Command History Before re-executing commands, you can view your command history using the history command. This displays all previously executed commands with line numbers ? history The output shows numbered commands from your session history ? 1 perl -v 2 sudo apt update 3 cal 4 ls -l 5 curl -s https://ipvigilante.com/122.175.62.177 ...

Read More

How to Force User to Change Password at Next Login in Linux?

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 743 Views

For security purposes, system administrators often need to force users to change their passwords at the next login. Linux provides several commands to manage password expiration and enforce password changes. This article demonstrates how to force a user to update their password on next login. List System Users First, let's view all users available in the system ? cut -d: -f1 /etc/passwd The output shows all system users ? mail news uucp proxy www-data backup list ... ubuntu uname1 Check Current Password Settings Before making changes, examine the current ...

Read More

Role of ViewPort in Visual Formatting Model

Shubham Vora
Shubham Vora
Updated on 15-Mar-2026 227 Views

The viewport plays a crucial role in the visual formatting model by defining the visible area of a web page. It determines how content is displayed across different devices and screen sizes, making it essential for responsive web design. What is a Visual Formatting Model? The visual formatting model is how web browsers decide to render HTML content on a web page. It determines the layout and positioning of elements based on CSS properties like margin, padding, border, and the viewport dimensions. Role of Viewport in Visual Formatting The viewport's primary role is to define the ...

Read More

How to Find User Account Info and Login Details in Linux?

Pradeep Elance
Pradeep Elance
Updated on 15-Mar-2026 5K+ Views

For system administrators, monitoring user account information is essential for security and system management. Linux provides several powerful commands to gather details about users, their login history, group memberships, and current activity. id Command The id command displays user and group identification numbers along with group memberships. It shows details for the current user by default, or you can specify a particular user. id id 2112 Running the above commands gives us the following result ? uid=1000(ubuntu) gid=1000(ubuntu) groups=1000(ubuntu), 4(adm), 24(cdrom), 27(sudo), 30(dip), 46(plugdev), 113(lpadmin), 128(sambashare) uid=2112(uname1) gid=2112(uname1) groups=2112(uname1) The ...

Read More
Showing 19671–19680 of 61,297 articles
Advertisements