Linux Articles

Page 109 of 134

How can I use wstring(s) in Linux APIs

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 598 Views

Wide character strings (wstrings) are sequences of wide characters that can represent Unicode characters from multiple languages and special symbols. In Linux programming, wstrings enable robust text handling for international applications, supporting characters from Arabic, Chinese, Russian, and special symbols like accents and emojis. What are wstrings and why use them? A wstring is a sequence of wide characters where each character uses the wchar_t data type, typically requiring more bytes than regular characters. This expanded representation allows encoding of characters beyond the ASCII range. Benefits of using wstrings in Linux APIs include: Unicode support ...

Read More

Uses of Exec Command in Linux

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 4K+ Views

The exec command is a built-in command in Unix and Linux shells that replaces the current shell process with a new process. Unlike regular command execution that creates a child process, exec overlays the current process entirely, making it particularly useful for process management and resource optimization in shell scripts. The basic syntax of the exec command is: exec [-cl] [-a name] [command [arguments...]] [redirection...] How Exec Works When you execute a command normally, the shell creates a new child process while keeping the parent shell running. With exec, the new command completely replaces ...

Read More

Find the Total Size of All Files in a Directory on Linux

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 6K+ Views

Finding the total size of all files in a directory is a common task for Linux system administrators and users who need to monitor disk usage and manage storage effectively. Linux provides several command-line tools and GUI applications to calculate directory sizes in various formats. Understanding directory sizes helps users identify storage bottlenecks, clean up unnecessary files, and optimize system performance. This guide covers multiple methods to find the total size of directories on Linux systems. Finding the Total Size Using Command-Line Tools The du Command The du (disk usage) command is the most commonly used ...

Read More

List the Size of Each File and Directory and Sort by Size in Linux

Prateek Jangid
Prateek Jangid
Updated on 17-Mar-2026 3K+ Views

Listing and sorting files and directories by size is essential for system administration, disk space management, and file organization. Linux provides multiple command-line tools and GUI methods to accomplish this task efficiently. This guide covers various approaches to list files and directories sorted by their size. Command Line Methods Using the ls Command The ls command is the most common tool for listing directory contents. By default, it sorts entries alphabetically, but you can modify this behavior with specific options. Basic listing with detailed information: ls -la This displays all files (including ...

Read More

Get the Full Path of a File in Linux

Kunal Verma
Kunal Verma
Updated on 17-Mar-2026 44K+ Views

Every file and folder in Linux has a path that directs the user to it. This path is required for programs and scripts to locate and access files. There are various ways to locate the path to a file or folder if you need to. We can get a full file path with different commands on a Linux machine. In this tutorial, we'll show you how to obtain a file's complete path in Linux using multiple command-line methods. Understanding File Paths in Linux In Linux, there are two different kinds of paths: absolute and relative. A forward ...

Read More

How to display the current working directory in the Linux system?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 38K+ Views

To print the current working directory, we use the pwd command in the Linux system. pwd (print working directory) − The pwd command is used to display the name of the current working directory in the Linux system using the terminal. This is a shell builtin command that is available in most Unix shells such as Bourne shell, ash, bash, ksh, and zsh. Syntax The general syntax of the pwd command is as follows − pwd [-LP] A brief description of options available in the pwd command. Option Description ...

Read More

How to change the file owner and group in Linux?

Shilpa S
Shilpa S
Updated on 17-Mar-2026 29K+ Views

To change the file owner and group, we use the chown command in the Linux operating system. Linux is a multiuser operating system where every file and directory belongs to an owner and group. The chown command allows administrators to transfer ownership and group membership of files and directories. Syntax The general syntax of the chown command is as follows − chown [OPTION]... [OWNER][:[GROUP]] FILE... chown [OPTION]... --reference=RFILE FILE... Common Options Option Description -c, --changes Gives a diagnosis for all files that actually changed ...

Read More

How to create a symbolic link to a directory in Ubuntu?

Mukul Latiyan
Mukul Latiyan
Updated on 17-Mar-2026 35K+ Views

Symbolic links (symlinks) in Linux are advanced shortcuts that point to another file or directory on your system. A symbolic link appears to be the same as the original file or directory it references, even though it's simply a pointer. This powerful feature allows you to create references to files and directories located elsewhere in the filesystem. What are Symbolic Links? Symbolic links are essentially file system objects that contain a path to another file or directory. When you access a symbolic link, the operating system automatically redirects you to the target location. This is particularly useful for ...

Read More

Exclude Multiple Patterns With Grep on Linux

Pradeep Jhuriya
Pradeep Jhuriya
Updated on 17-Mar-2026 23K+ Views

Grep is a powerful command-line utility on Linux that allows users to search for patterns in text files. It is widely used for tasks such as searching log files for specific strings, filtering configuration files, or extracting information from large datasets. One of the useful features of grep is the ability to exclude multiple patterns from the search results, which helps filter out irrelevant or unwanted lines. Excluding a Single Pattern with Grep The easiest way to exclude a pattern from a grep search is to use the -v option (invert match). This option tells grep to display ...

Read More

Run a Script on Startup in Linux

Satish Kumar
Satish Kumar
Updated on 17-Mar-2026 86K+ Views

There are several ways to run a script on startup in Linux, depending on your specific distribution and the type of script you are trying to run. Each method has its own advantages and is suitable for different use cases. Methods Overview Method Best For Linux Systems User Level systemd System services, daemons Modern distributions System-wide cron (@reboot) Simple scripts, scheduled tasks All distributions User or system rc.local Quick system scripts Traditional systems System-wide init.d Legacy system services Older distributions System-wide .bashrc/.bash_profile User-specific ...

Read More
Showing 1081–1090 of 1,338 articles
« Prev 1 107 108 109 110 111 134 Next »
Advertisements