*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> rmdir (1)              
Title
Content
Arch
Section
 

rmdir(1)

Contents


NAME    [Toc]    [Back]

       rmdir - Removes a directory

SYNOPSIS    [Toc]    [Back]

       rmdir [-p] directory...

STANDARDS    [Toc]    [Back]

       Interfaces  documented  on  this reference page conform to
       industry standards as follows:

       rmdir:  XCU5.0

       Refer to the standards(5) reference page for more information
 about industry standards and associated tags.

OPTIONS    [Toc]    [Back]

       Removes  all  directories in a path name.  For each directory
 argument, the directory entry it names is removed.

              If the directory argument includes  more  than  one
              path name component, effects equivalent to the following
 command occur: rmdir -p $(dirname directory)

              That  is,  rmdir recursively removes each directory
              in the path name.

OPERANDS    [Toc]    [Back]

       The path name of an empty directory to be removed.

DESCRIPTION    [Toc]    [Back]

       The rmdir command removes a  directory  from  the  system.
       The  directory must be empty before you can remove it, and
       you must have write permission in  its  parent  directory.
       Use the ls -al command to see if a directory is empty.

       If  a  directory  and a subdirectory of that directory are
       specified in a single invocation of rmdir,  the  subdirectory
 must be specified before the parent directory so that
       the parent directory will be empty  when  rmdir  tries  to
       remove it.

RESTRICTIONS    [Toc]    [Back]

       A  directory  must  be empty before you can remove it, and
       you must have write permission in  its  parent  directory.
       If the -p option is used, all directories in the path must
       be  empty  except  for  the  directory  being  recursively
       removed.

EXIT STATUS    [Toc]    [Back]

       The  following  exit  values  are returned: Each directory
       specified by directory operand was  successfully  removed.
       An error occurred.

EXAMPLES    [Toc]    [Back]

       To  empty  and  remove  a  directory,  enter:  rm  mydir/*
       mydir/.*  rmdir mydir

              This removes the contents of  mydir,  then  removes
              the  empty  directory.  The  rm command displays an
              error message about trying to remove  the  directories
  .  (dot)  and  ..  (dot  dot), and then rmdir
              removes them.

              Note that rm mydir/* mydir/.*  first removes  files
              with  names  that  do  not begin with a (dot), then
              those with names that do begin with a  (dot).   You
              may  not  realize  that the directory contains file
              names that begin with a (dot) because the  ls  command
 does not normally list them unless you use the
              -a option to see the files whose names begin with a
              (dot).   To  remove  all  of the directories in the
              path name a/b/c, enter: rmdir -p a/b/c

              Use a command like this one if directory a  in  the
              current  directory is empty except that it contains
              a directory b and a/b is empty except that it  contains
 a directory c.

ENVIRONMENT VARIABLES    [Toc]    [Back]

       The  following  environment variables affect the execution
       of rmdir: Provides a default value for the  internationalization
 variables that are unset or null. If LANG is unset
       or null, the corresponding value from the  default  locale
       is used. If any of the internationalization variables contain
 an invalid setting, the utility behaves as if none of
       the  variables  had  been  defined.  If set to a non-empty
       string value, overrides the values of all the other internationalization
  variables.  Determines the locale for the
       interpretation of sequences of bytes of text data as characters
  (for  example, single-byte as opposed to multibyte
       characters in arguments).  Determines the locale  for  the
       format  and  contents  of  diagnostic  messages written to
       standard error.  Determines the location of message  catalogues
 for the processing of LC_MESSAGES.

SEE ALSO    [Toc]    [Back]

      
      
       Commands:  mkdir(1), ls(1), rm(1)

       Functions:  rmdir(2), unlink(2), remove(3)

       Standards:  standards(5)



                                                         rmdir(1)
[ Back ]
 Similar pages
Name OS Title
pxfrmdir IRIX Removes a directory entry
pxfunlink IRIX Removes a directory entry
lndir OpenBSD create a shadow directory of symbolic links to another directory tree
lndir Tru64 create a shadow directory of symbolic links to another directory tree
cd_cdrec Tru64 reads the Directory Record from a CDROM directory
cd_drec Tru64 reads the Directory Record from a CDROM directory
dirent HP-UX format of directory streams and directory entries
cddrec Tru64 Read Directory Record from CD-ROM directory
rmfdmn Tru64 removes a file domain
DXmSvnRemoveComponent Tru64 Removes a component from each SVN entry.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service