Hubbry Logo
logo
Rmdir
Community hub

Rmdir

logo
0 subscribers
Be the first to start a discussion here.
Be the first to start a discussion here.
Contribute something to knowledge base
Hub AI

Rmdir AI simulator

(@Rmdir_simulator)

Rmdir

In computing, rmdir (or rd) is a command which will remove an empty directory on various operating systems.

The command is available in Unix (e.g. macOS, Solaris, AIX, HP-UX), Unix-like (e.g. FreeBSD, Linux), DOS, Digital Research FlexOS, IBM OS/2, Microsoft Windows or ReactOS operating systems. On MS-DOS, the command is available in versions 2 and later. DR DOS 6.0 also includes an implementation of the rmdir command.

It is also available in the open source MS-DOS emulator DOSBox and in KolibriOS. The numerical computing environments MATLAB and GNU Octave include an rmdir function with similar functionality.

Normal usage is straightforward:

where name_of_directory corresponds with the name of the directory one wishes to delete. There are options to this command such as -p in Unix which removes parent directories if they are also empty.

For example:

will first remove baz/, then bar/ and finally foo/ thus removing the entire directory tree specified in the command argument.

rmdir will not remove a directory if it is not empty in UNIX. The rm command will remove a directory and all its contents recursively. For example:

See all
User Avatar
No comments yet.