rm
Remove each argument from the filesystem. toybox
On Linux, Windows 5 Sigma rules name it
Linux
rm [-fiRrv] FILE...
-fForce: remove without confirmation, no error if it doesn't exist-iInteractive: prompt for confirmation-rRRecursive: remove directory contents-vVerboseSeveral platforms
Remove files or directories.
Remove specific files
rm path/to/file1 path/to/file2 ...IdentifyTrips 1 Sigma rule: informationalFile Deletion by Ömer Günal, oscd.community
Remove specific files ignoring nonexistent ones
rm --force path/to/file1 path/to/file2 ...IdentifyTrips 1 Sigma rule: informationalFile Deletion by Ömer Günal, oscd.community
Remove specific files interactively prompting before each removal
rm --interactive path/to/file1 path/to/file2 ...IdentifyTrips 1 Sigma rule: informationalFile Deletion by Ömer Günal, oscd.community
Remove specific files printing info about each removal
rm --verbose path/to/file1 path/to/file2 ...IdentifyTrips 1 Sigma rule: informationalFile Deletion by Ömer Günal, oscd.community
Remove specific files and directories recursively
rm --recursive path/to/file_or_directory1 path/to/file_or_directory2 ...IdentifyTrips 1 Sigma rule: informationalFile Deletion by Ömer Günal, oscd.community
Remove empty directories (this is considered the safe method)
rm --dir path/to/directoryIdentifyTrips 1 Sigma rule: informationalFile Deletion by Ömer Günal, oscd.community
Windows
In PowerShell, this command is an alias of Remove-Item.