Tagged articles
rm
19 articles · Page 1 of 1
This guide explains why Linux's rm command doesn't truly erase data, describes the two recovery windows (process‑held and un‑overwritten blocks), and walks through three practical recovery methods—using /proc FDs, ext4‑specific tools, and generic carving utilities—while also offering prevention strategies such as trash‑cli, snapshots, and robust backup practices.
EXT4LVMLinux
0 likes · 46 min read

This article explains how to use Bash aliases safely, highlights common mistakes such as improper argument handling and command chaining, and shows how to replace risky aliases with shell functions for more reliable file deletion.
aliasbashrm
0 likes · 8 min read


ITPUBNov 21, 2023 · Operations
A developer recounts accidentally running rm -fr /* on a production server, explains how quick interruption, clever use of remaining commands, and step‑by‑step recovery restored critical directories, and shares practical safeguards to prevent such catastrophic deletions in the future.
Linuxbackupdata recovery
0 likes · 11 min read

This guide explains what symbolic links are, why Linux lacks a dedicated delete command, and how to reliably remove them using rm or unlink, covering single links, multiple links, directory links, and hard links with practical examples and pitfalls.
LinuxSymbolic LinkUNLINK
0 likes · 6 min read

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.
LinuxUNLINKfile deletion
0 likes · 5 min read

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.
LinuxUNLINKfile deletion
0 likes · 5 min read

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.
Linuxcommand-linefile deletion
0 likes · 7 min read

This guide shows why files whose names begin with a dash cannot be removed with a regular rm command and demonstrates the correct use of the '--' option to delete such files safely on a Linux system.
command-linefile-managementrm
0 likes · 3 min read

This guide outlines critical precautions and best‑practice tips for executing risky Linux commands—such as rm, chmod, cat, dd, tar, and MySQL—by verifying environments, backing up data, using safe aliases, and avoiding common pitfalls that can cause catastrophic data loss.
LinuxOperationsbackup
0 likes · 8 min read

The article explains why a large log file appears to occupy several gigabytes with `ls` yet only a few megabytes with `du`, covering file deletion semantics, open file handles, the difference between apparent size and disk usage, and how sparse files cause this discrepancy.
Filesystemduls
0 likes · 12 min read

This article outlines five typical cloud‑host file‑loss scenarios—including tmpfs data loss after reboot, accidental rm commands, and disk damage from fio or dd—explains their causes, and provides practical prevention and recovery recommendations for operations engineers.
Operationsclouddd
0 likes · 10 min read


ITPUBApr 11, 2020 · Operations
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

This guide walks you through safely removing directories on Linux using rmdir for empty folders, rm for recursive deletions with various options, and find for pattern‑based removal, while highlighting required permissions, common pitfalls, and practical command‑line examples.
directory deletionfindrm
0 likes · 8 min read

This article explains common scenarios that lead to accidental directory or file deletions in Linux shell scripts—such as empty variables, spaces in paths, special characters, and failed cd commands—and provides practical Bash techniques like variable expansion checks, quoting, set -u, logical short‑circuiting, and safer prompts to avoid catastrophic rm -rf mistakes.
LinuxOperationsaccidental-deletion
0 likes · 8 min read


21CTODec 15, 2018 · Information Security
This article recounts several real incidents where disgruntled engineers or admins deleted critical databases as retaliation, highlighting the severe consequences and stressing that proper backups and cautious use of destructive commands are essential for any organization.
Operationsincidentrm
0 likes · 5 min read

This guide shows how to create a personal recycle bin on Linux by redefining the rm command with Bash aliases and functions, enabling safe file deletion, restoration, and cleanup while explaining each step, the required code, and usage examples.
CommandLineTrashalias
0 likes · 5 min read

This article explains what happens inside the Linux kernel when the rm command deletes a file on an ext4 filesystem, analyzes the relevant VFS and ext4 source code, and demonstrates how large‑file deletions can degrade I/O performance of other applications.
EXT4FilesystemLinux
0 likes · 12 min read


ITPUBJan 24, 2017 · Fundamentals
This guide explains common Linux shell pitfalls that can cause accidental directory deletions—such as empty variables, spaces, special characters, and failed cd commands—and provides practical safeguards like variable expansion checks, quoting, existence tests, logical operators, avoiding root operations, and using informative prompts.
DevOpsLinuxbash
0 likes · 6 min read

This article explains why the infamous rm -rf / command is blocked by modern POSIX‑compliant coreutils, shows the exact error messages, details version requirements, and demonstrates how the dangerous --no-preserve-root option can override the safety guard.
LinuxPOSIXcommand safety
0 likes · 6 min read
