The Linux command rmdir cannot recursively delete directories, this program can. Plus rm -r is too much to type and remember.
Run the below command to compile the program.
ldc2 rmd.d
For better optimization, compile using the below options.
ldc2 -O3 -release rmd.d
Run the shell script to create some dummy directories and files.
chmod +x stage.sh
./stage.sh
./rmd dir