Tagged articles
23 articles
Page 1 of 1
php Courses
php Courses
Sep 17, 2025 · Backend Development

Master PHP’s unlink(): Delete Files & Directories Safely

Learn how to use PHP’s unlink() function to delete files and empty directories, understand its syntax, handle return values, see practical code examples for file and directory removal, and discover important considerations such as handling non‑empty directories and error checking.

PHPUNLINKdirectory deletion
0 likes · 4 min read
Master PHP’s unlink(): Delete Files & Directories Safely
php Courses
php Courses
Oct 18, 2023 · Backend Development

How to Use PHP unlink() to Delete Files and Directories

This tutorial explains the PHP unlink() function, covering its syntax, parameters, return values, and practical examples for deleting both files and empty directories, while also noting its limitations and the need for rmdir() when handling non‑empty directories.

PHPUNLINKdirectory deletion
0 likes · 5 min read
How to Use PHP unlink() to Delete Files and Directories
MaGe Linux Operations
MaGe Linux Operations
Dec 19, 2022 · Fundamentals

What Happens When You Delete an In‑Use File on Linux?

This article investigates Linux's handling of files that are in use—whether opened for reading, running as executables, or loaded as shared libraries—by experimenting with deletion, replacement, and modification, revealing how the kernel preserves file contents via inode references until all processes release them.

Shared LibrarySystem Callfile deletion
0 likes · 16 min read
What Happens When You Delete an In‑Use File on Linux?
Liangxu Linux
Liangxu Linux
Sep 13, 2022 · Operations

When to Use unlink vs rm: Master Linux File Deletion

This article explains how the Linux unlink command deletes files and links, details its usage syntax, highlights its limitations—such as inability to remove multiple items or directories—and compares it with the more versatile rm command, helping you choose the right tool for safe file removal.

UNLINKfile deletionlinux
0 likes · 5 min read
When to Use unlink vs rm: Master Linux File Deletion
Open Source Linux
Open Source Linux
Aug 18, 2022 · Operations

Master the Linux unlink Command: When and How to Use It vs rm

This article explains the Linux unlink command, how it deletes files and links, its syntax, limitations compared with rm, and scenarios where using unlink is preferable, providing clear examples and safety considerations for system administrators.

System AdministrationUNLINKfile deletion
0 likes · 5 min read
Master the Linux unlink Command: When and How to Use It vs rm
Liangxu Linux
Liangxu Linux
Oct 4, 2021 · Fundamentals

What Does sudo rm -rf Actually Do? A Deep Dive into Linux Deletion Commands

This article demystifies the infamous sudo rm -rf command, explaining how rm works, the role of sudo, the effects of recursive and force options, directory deletion nuances, safety mechanisms, and why misuse can erase an entire Linux system, illustrated with concrete examples and command screenshots.

Sudocommand-linefile deletion
0 likes · 7 min read
What Does sudo rm -rf Actually Do? A Deep Dive into Linux Deletion Commands
Liangxu Linux
Liangxu Linux
Sep 5, 2020 · Operations

Why Deleting Large Files Doesn’t Free Disk Space on Linux and How to Fix It

When a large file is deleted on a Linux server but the '/' partition still reports 100% usage, a running process likely still holds the file open, preventing space reclamation; this article explains the cause, shows how to find deleted‑but‑in‑use files with lsof, and offers recovery steps such as killing processes, restarting services, truncating logs, and adjusting reserved block percentages.

file deletionlinuxlsof
0 likes · 10 min read
Why Deleting Large Files Doesn’t Free Disk Space on Linux and How to Fix It
ITPUB
ITPUB
Apr 11, 2020 · Operations

Which Linux Command Deletes Hundreds of Thousands of Files the Fastest?

This article benchmarks several Linux techniques—including rm, find, rsync, Python, and Perl—for deleting 500,000 small files, measuring execution times and revealing that rsync with the --delete option completes the task in under 20 seconds, far outpacing traditional commands.

Pythonfile deletionfind
0 likes · 4 min read
Which Linux Command Deletes Hundreds of Thousands of Files the Fastest?
Liangxu Linux
Liangxu Linux
Apr 11, 2020 · Operations

Which Linux Deletion Method Is Fastest for Half a Million Files?

This article creates 500,000 small files on a Linux system and benchmarks various deletion techniques—including rm, find, rsync, Python, and Perl—showing their execution times and concluding which method offers the best performance and convenience.

Performance TestingScriptingfile deletion
0 likes · 4 min read
Which Linux Deletion Method Is Fastest for Half a Million Files?
MaGe Linux Operations
MaGe Linux Operations
Apr 1, 2020 · Operations

Which Linux Command Deletes Massive Files Fastest? Benchmark Results

This article benchmarks several Linux methods for deleting half a million small files—including rm, find with -exec, find with -delete, rsync, Python, and Perl—showing their execution times and concluding that rsync with the --delete option is the quickest and most convenient solution.

PythonShell Commandsfile deletion
0 likes · 4 min read
Which Linux Command Deletes Massive Files Fastest? Benchmark Results
Open Source Linux
Open Source Linux
Feb 13, 2020 · Operations

Create a Linux Recycle Bin with a Simple Shell Script

Learn how to build a custom recycle bin on Linux using a Bash script that moves deleted files to a timestamped folder, includes user confirmation, sets proper permissions, schedules automatic cleanup with cron, and can even replace the rm command via an alias.

Recycle Binfile deletionlinux
0 likes · 4 min read
Create a Linux Recycle Bin with a Simple Shell Script
MaGe Linux Operations
MaGe Linux Operations
Jun 9, 2017 · Operations

5 Powerful Linux Commands to Delete All Files in a Directory

This guide presents five effective Linux command-line techniques for removing every file in the current directory and another five methods for clearing all files within a specified directory, covering simple rm usage, find with -delete or -exec, xargs, and loop constructs.

Automationfile deletionlinux
0 likes · 3 min read
5 Powerful Linux Commands to Delete All Files in a Directory