karthikeya Boyini

karthikeya Boyini

1,420 Articles Published

Articles by karthikeya Boyini

Page 7 of 142

How to Protect Files and Directories from Deleting in Linux

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 2K+ Views

The chattr (change attribute) command is a powerful Linux utility that allows system administrators to set or unset specific attributes on files and directories. This tool provides an additional layer of protection against accidental deletion or modification, even when logged in as the root user. It's particularly useful for protecting critical system files, configuration files, and important data. This article demonstrates how to use chattr to safeguard your files and directories from unauthorized or accidental deletion, providing essential security for sensitive content. How chattr Works The chattr command modifies file attributes at the filesystem level. The most ...

Read More

Mastering User Management on Linux

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 379 Views

User management is a fundamental skill for Linux administrators. This article covers essential commands for creating, modifying, and deleting user accounts, managing groups, and monitoring user activities in Linux systems. In the examples below, sai is used as the username for demonstration purposes. usermod Command The usermod command modifies existing user account attributes. It allows administrators to change user properties without recreating the account. To get help information about usermod − $ usermod --help Key options include − -c, --comment COMMENT ...

Read More

The Best Linux based OS Distributions in 2016

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 562 Views

This article helps you understand the key features of Linux operating systems to choose the right distribution for your environment. The year 2016 marked a crucial period for Linux, especially in enterprise-level and consumer segments. As Linux has evolved significantly over the past two decades, various distributions now cater to specific use cases and requirements. Free/Open Source Server Distributions Debian and CentOS For server deployments requiring free or open-source solutions without subscription fees (unlike RHEL or SLE), Debian and CentOS are excellent choices. These community-based distributions offer high standards for server environments with long-term support, eliminating concerns ...

Read More

How to Add Cron Jobs to A Specific User in a Linux System

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 3K+ Views

This article will teach you how to schedule cron jobs for specific users in a Linux system. Cron is a time-based job scheduler that allows you to execute commands or scripts automatically at specified times and dates. General Syntax of a Cron Job MIN HOUR Day of month Month Day of Week Command 0-59 0-23 1-31 1-12 ...

Read More

What is the Item property of BitArray class in C#?

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 168 Views

The Item property of the BitArray class in C# gets or sets the value of the bit at a specific position in the BitArray. This property acts as an indexer, allowing you to access individual bits using bracket notation like bitArray[index]. The Item property provides a convenient way to read and modify individual bits without having to use explicit method calls. It returns a bool value representing the bit state at the specified index. Syntax Following is the syntax for accessing the Item property − public bool this[int index] { get; set; } ...

Read More

How to access array elements using a pointer in C#?

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 4K+ Views

In C#, accessing array elements using pointers requires understanding the key differences between arrays and pointers. An array name and a pointer to the same data type are not the same variable type. For example, int *p and int[] p represent different types. You can increment a pointer variable because it's not fixed in memory, but an array address is fixed in memory and cannot be incremented directly. To access array elements using pointers in C#, you must use unsafe code and the fixed statement to pin the array in memory temporarily. Syntax Following is the syntax ...

Read More

Multiple Where clause in C# Linq

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 5K+ Views

In C# LINQ, you can apply multiple where clauses to filter collections based on different conditions. Each additional where clause further narrows down the results, creating a logical AND relationship between the conditions. Syntax There are two main approaches to using multiple where clauses − Query Syntax with Multiple Where Clauses: var result = from item in collection where condition1 where condition2 ...

Read More

C# program to generate secure random numbers

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 2K+ Views

For secure random numbers, use the RNGCryptoServiceProvider class or the newer RandomNumberGenerator class. These implement cryptographic random number generators that are suitable for security-sensitive applications like generating passwords, tokens, or encryption keys. Secure random numbers differ from regular Random class numbers because they use entropy from the operating system and are cryptographically secure, making them unpredictable even if an attacker knows some previously generated values. Syntax Following is the syntax for generating secure random bytes − using (RNGCryptoServiceProvider crypto = new RNGCryptoServiceProvider()) { byte[] randomBytes = new byte[4]; crypto.GetBytes(randomBytes); ...

Read More

How to calculate the Size of Folder using C#?

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 4K+ Views

To calculate the size of a folder in C#, you need to traverse through all files in the folder and its subdirectories, then sum up their sizes. The DirectoryInfo class provides methods to enumerate files and directories, making this task straightforward. Syntax Following is the syntax for getting folder information and enumerating files − DirectoryInfo info = new DirectoryInfo(@"C:\FolderPath"); long size = info.EnumerateFiles("*", SearchOption.AllDirectories).Sum(file => file.Length); Using DirectoryInfo for Simple Folder Size The most basic approach uses DirectoryInfo.EnumerateFiles() with SearchOption.AllDirectories to include all subdirectories − using System; using System.IO; using System.Linq; ...

Read More

C# Linq Where Method

karthikeya Boyini
karthikeya Boyini
Updated on 17-Mar-2026 3K+ Views

The Where method in LINQ is used to filter elements from a collection based on a specified condition (predicate). It returns a new IEnumerable containing only the elements that satisfy the given criteria. Syntax The Where method has two overloads − // Filter based on element value only public static IEnumerable Where(this IEnumerable source, Func predicate) // Filter based on element value and index public static IEnumerable Where(this IEnumerable source, Func predicate) Parameters source − The input sequence to filter predicate − A function that tests each element for a condition ...

Read More
Showing 61–70 of 1,420 articles
« Prev 1 5 6 7 8 9 142 Next »
Advertisements