# rm - Delete File or Directory Delete a file or directory from the target system. ## Description The `rm` command deletes a file or directory from the target system. WARNING: Deletion of critical system files or directories (System32, Windows, Program Files, etc.) will be blocked for safety. ## Syntax ``` rm ``` ## Parameters - `path` (required): File or directory path to delete. Supports both absolute and relative paths. ## Examples ``` rm C:\temp\file.txt rm C:\temp\old_folder rm backup.log ``` ## Features - Supports both absolute and relative paths (relative paths are resolved using the current working directory) - Can delete individual files or entire directories - WARNING: Deletion of critical system files or directories (System32, Windows, Program Files, etc.) will be blocked for safety - Use with caution as deleted files cannot be recovered through this command ## Output ``` [rm] File deleted: C:\temp\file.txt ``` ## OPSEC Considerations - File deletions are logged by EDR/XDR solutions - Deleting system files may trigger alerts - Consider the operational impact before deleting files --- **Command Category:** File System **Requires Admin:** No