Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

rmdir(1) [v7 man page]

RMDIR(1)							   User Commands							  RMDIR(1)

NAME
rmdir - remove empty directories SYNOPSIS
rmdir [OPTION]... DIRECTORY... DESCRIPTION
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 and its ancestors; 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
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report rmdir translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
rmdir(2) Full documentation at: <http://www.gnu.org/software/coreutils/rmdir> or available locally via: info '(coreutils) rmdir invocation' GNU coreutils 8.28 January 2018 RMDIR(1)

Check Out this Related Man Page

RMDIR(1)                                                           User Commands                                                          RMDIR(1)

NAME
rmdir - remove empty directories SYNOPSIS
rmdir [OPTION]... DIRECTORY... DESCRIPTION
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 and its ancestors; 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
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report rmdir translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
rmdir(2) Full documentation at: <http://www.gnu.org/software/coreutils/rmdir> or available locally via: info '(coreutils) rmdir invocation' GNU coreutils 8.28 January 2018 RMDIR(1)
Man Page

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

remove a nonempty directory

How can I remove a non empty directory. ' rmdir directory_name ' complains that the directory is not empty. The same problem happens with ' rmdir directory_name/* ' Thanks (2 Replies)
Discussion started by: babayeve
2 Replies

2. 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

3. HP-UX

Can't delete a directory on HP-UX

Hi, I am having hard time to delete a directory: $ rm -r testoxdwdw rm: testoxdwdw non-existent $ rmdir testoxdwdw rmdir: testoxdwdw: No such file or directory $ rm -rf testoxdwdw Thanks! (2 Replies)
Discussion started by: oradbus
2 Replies

4. Solaris

Remove non empty dirctory

Hi, Any command or means to delete a director which is not empty rmdir or similar iam using Sun Solaries 2.6 :confused: I have many full directories with subdirectories and I can not go on emptying them all (5 Replies)
Discussion started by: adol3
5 Replies

5. Solaris

Can't remove a directory

Hello, somehow a directory called -r was created on one of my servers and I can't remove is using either rm or rmdir. Is there a way to remove this directory? Thank you. -David (2 Replies)
Discussion started by: dkranes
2 Replies

6. UNIX for Dummies Questions & Answers

Getting same exit status for empty and non empty file

Hi All, I am checking for a empty input file to do some further action , but I am getting exit status 0 in both the cases , for empty and non empty file both. The value of $? is coming 0 in if part also and else part too. #!/bin/ksh if ]; then echo "data" # exit 0 echo "$?" else... (4 Replies)
Discussion started by: mavesum
4 Replies

7. Solaris

help with command

how to remove a non-empty directory using rmdir command. (2 Replies)
Discussion started by: sudhiroracle
2 Replies

8. Shell Programming and Scripting

redirection entree sortie

Bonjour, J'ai un répertoire /travail qui est vide. je lance dans une console cd /travail puis rmdir aa 2>&1 > /dev/null et s'affiche alors " rmdir : aa :Aucun fichier ou répertoire de ce type." J'essaie de comprendre : rmdir aa 2>&1 redirige 2 vers 1 donc le message d'erreur vers... (4 Replies)
Discussion started by: quisuisje
4 Replies

9. UNIX for Dummies Questions & Answers

Remove only Empty Directories

I know this one was answered before in forum below - https://www.unix.com/unix-dummies-questions-answers/58210-removing-empty-folders-using-find-command.html But that one is closed & I have a question so here it goes. I want to delete all 2006 files. Now if along with the files, if the... (2 Replies)
Discussion started by: kedar.mehta
2 Replies