RMDIR(1) BSD General Commands Manual RMDIR(1)NAME
rmdir -- remove directories
rmdir [-p] directory ...
The rmdir utility removes the directory entry specified by each directory argument, provided it is empty.
Arguments are processed in the order given. In order to remove both a parent directory and a subdirectory of that parent, the subdirectory
must be specified first so the parent directory is empty when rmdir tries to remove it.
The following option is available:
-p Each directory argument is treated as a pathname of which all components will be removed, if they are empty, starting with the last
most component. (See rm(1) for fully non-discriminant recursive removal.)
The rmdir utility exits with one of the following values:
0 Each directory entry specified by a dir operand referred to an empty directory and was removed successfully.
>0 An error occurred.
SEE ALSO rm(1)STANDARDS
The rmdir command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
A rmdir command appeared in Version 1 AT&T UNIX.
BSD May 31, 1993 BSD
Check Out this Related Man Page
RMDIR(1) FSF RMDIR(1)NAME
rmdir - remove empty directories
rmdir [OPTION]... DIRECTORY...
Remove the DIRECTORY(ies), if they are empty.
ignore each failure that is solely because a directory is non-empty
remove DIRECTORY, then try to remove each directory component of that path name. E.g., `rmdir -p a/b/c' is similar to `rmdir a/b/c
output a diagnostic for every directory processed
--help display this help and exit
output version information and exit
Written by David MacKenzie.
Report bugs to <firstname.lastname@example.org>.
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICU-
The full documentation for rmdir is maintained as a Texinfo manual. If the info and rmdir programs are properly installed at your site,
should give you access to the complete manual.
rmdir (coreutils) 4.5.3 February 2003 RMDIR(1)
hi, i understand that rmdir will only remove direcotry when it is empty but are there options which will also remove non-empty directories? i went to man rmdir but only find the option -p? i am on solaris. thanks (2 Replies)
If I am root user, and trying to chown everything in a directory and it's subdirectories (e.g. httpdocs and everything inside that directory, including it's sub directories), how would I do that? I tried it with -r but it didnt seem to work...can someone help with the correct syntax?
Also, if I... (3 Replies)
We use a very basic version of unix via putty and are not experts by any means.
We accidentally submitted the statement: "mkdir -l" ("dash-letter L) and a new directory was created. Putty/UNIX will now not recognize the statement "rmdir -l". When we run a "ls -l" command, it shows... (3 Replies)
I have some files that appear to have no inode numbers. To complicate the matter, the filenames have UTF8 (I think) characters.
I am trying to delete them. In fact, and this might make things easier, I'm trying to delete their parent directory.
I don't know what to try next, please help.
... (5 Replies)
Im going insane trying to figure out what i consider a basic command on an SFTP server...
Im trying to download all files from a directory *done*
then remove all the files (and sometimes folders that contain files) i have downloaded on the remote directory...
the command i would normally... (2 Replies)