Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rmdir(1) [osx man page]

RMDIR(1)						    BSD General Commands Manual 						  RMDIR(1)

rmdir -- remove directories SYNOPSIS
rmdir [-p] directory ... DESCRIPTION
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
The rmdir command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible. HISTORY
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)

rmdir - remove empty directories SYNOPSIS
Remove the DIRECTORY(ies), if they are empty. --ignore-fail-on-non-empty ignore each failure that is solely because a directory is non-empty -p, --parents 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 a/b a'. -v, --verbose output a diagnostic for every directory processed --help display this help and exit --version output version information and exit AUTHOR
Written by David MacKenzie. REPORTING BUGS
Report bugs to <>. COPYRIGHT
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- LAR PURPOSE. SEE ALSO
The full documentation for rmdir is maintained as a Texinfo manual. If the info and rmdir programs are properly installed at your site, the command info rmdir should give you access to the complete manual. rmdir (coreutils) 4.5.3 February 2003 RMDIR(1)
Man Page

5 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

rmdir a non-empty directory.

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)
Discussion started by: yls177
2 Replies

2. UNIX for Dummies Questions & Answers

-r paramater with chown and rmdir

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)
Discussion started by: Eman619
3 Replies

3. UNIX for Dummies Questions & Answers

Quick question...rmdir -l

Hello, 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)
Discussion started by: UDcc123
3 Replies

4. UNIX for Dummies Questions & Answers

How do you delete files that are seemingly missing inodes?

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)
Discussion started by: jaffachamp
5 Replies

5. UNIX for Dummies Questions & Answers

Running script on SFTP server, RMDIR and RM with wildcards

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)
Discussion started by: mokachoka
2 Replies