IT Questions and Answers :)

Monday, May 20, 2019

In Linux, the rmdir command (without any flags):

In Linux, the rmdir command (without any flags):

  • Removes a directory and its contents
  • Removes empty directories
  • Removes a directory and all of its subdirectories
  • Remotely creates a directory 
In Linux, the rmdir command (without any flags):

EXPLANATION

 

rmdir

Remove directory, this command will only work if the folders are empty.
Syntax
      rmdir [options]... folder(s)...

Options
      --ignore-fail-on-non-empty
                  Ignore each failure that is solely because the
                  directory is non-empty.

  -p, --parents   Remove explicit parent directories if being emptied

      --verbose   Output a diagnostic for every directory processed

      --help      Display help and exit

      --version   Output version information and exit
Example

$ rmdir myfolder
Before removing directories with a wildcard, it's wise to list them first:
$ ls -d britney*/
Share:

0 comments:

Post a Comment

Popular Posts