CmdID

CmdID / Commands

rmdir

Deletes a directory. Windows commands reference

On Windows, Linux 1 Sigma rule name it

Opens CmdID with your command. It is read in your browser and sent nowhere.

Windows

from the Windows commands reference, CC BY 4.0

Deletes a directory. The rmdir command can also run from the Windows Recovery Console, using different parameters. For more information, see Windows Recovery Environment (WinRE). NOTE: This command is the same as the rd command.

rmdir [<drive>:]<path> [/s [/q]]

To change to the parent directory so you can safely remove the desired directory, type

To remove a directory named test (and all its subdirectories and files) from the current directory, type

rmdir /s testIdentify
/sDeletes a directory tree (the specified directory and all its subdirectories, including all files). Windows commands reference

Trips 1 Sigma rule: lowDirectory Removal Via Rmdir by frack113

To run the previous example in quiet mode, type

rmdir /s /q testIdentify
/sDeletes a directory tree (the specified directory and all its subdirectories, including all files). Windows commands reference
/qSpecifies quiet mode. Windows commands reference

Trips 1 Sigma rule: lowDirectory Removal Via Rmdir by frack113

[<drive>:]<path>Specifies the location and the name of the directory that you want to delete. Path is required. If you include a backslash (\) at the beginning of the specified path, then the path starts at the root directory (regardless of the current directory).
/sDeletes a directory tree (the specified directory and all its subdirectories, including all files).
/qSpecifies quiet mode. Does not prompt for confirmation when deleting a directory tree. The /q parameter works only if /s is also specified. CAUTION: When you run in quiet mode, the entire directory tree is deleted without confirmation. Make sure that important files are moved or backed up before using the /q command-line option.
/?Displays help at the command prompt.

Linux

from the toybox, 0BSD

Remove one or more directories.

rmdir [-p] [DIR...]
-pRemove path
--ignore-fail-on-non-emptyIgnore failures caused by non-empty directories

Several platforms

from tldr-pages, CC BY 4.0

Remove directories without files.

Remove specific directories

rmdir path/to/directory1 path/to/directory2 ...Identify

Remove specific nested directories recursively

rmdir --parents path/to/directory1 path/to/directory2 ...Identify

Clean a directory of empty directories

rmdir *Identify

Windows

from tldr-pages, CC BY 4.0

Remove a directory and its contents. In PowerShell, this command is an alias of Remove-Item. This documentation is based on the Command Prompt (cmd) version of rmdir.

Remove an empty directory

rmdir path\to\directoryIdentify

Remove a directory and its contents recursively

rmdir path\to\directory /sIdentify
/sDeletes a directory tree (the specified directory and all its subdirectories, including all files). Windows commands reference

Trips 1 Sigma rule: lowDirectory Removal Via Rmdir by frack113

Remove a directory and its contents recursively without prompting

rmdir path\to\directory /s /qIdentify
/sDeletes a directory tree (the specified directory and all its subdirectories, including all files). Windows commands reference
/qSpecifies quiet mode. Windows commands reference

Trips 1 Sigma rule: lowDirectory Removal Via Rmdir by frack113

What detects it

Sigma process creation rules that name rmdir
mediumLinux Logs Clearing AttemptsÖmer Günal, oscd.community