rmdir -
It stands for remove directory, and as the name suggests it is use to remove any empty directory.
E.g.- rmdir mydirectory
Above command will remove the directory with name 'mydirectory' only if it is empty. (If it does not contain any other directory or any file in it.)
syntax - rmdir <directory_name>
Options-
-p, --parents:
This option helps to remove sub directories with it`s parent directory. If you want to remove multiple directories of a parent directories in directory as well as its parent directory.
E.g. - rmdir -p /dir1/dir2
This will delete dir1 and dir2 as well.
-v, --verbose:
This option will just display a message for each directory deleted succesfully.
It stands for remove directory, and as the name suggests it is use to remove any empty directory.
E.g.- rmdir mydirectory
Above command will remove the directory with name 'mydirectory' only if it is empty. (If it does not contain any other directory or any file in it.)
syntax - rmdir <directory_name>
Options-
-p, --parents:
This option helps to remove sub directories with it`s parent directory. If you want to remove multiple directories of a parent directories in directory as well as its parent directory.
E.g. - rmdir -p /dir1/dir2
This will delete dir1 and dir2 as well.
-v, --verbose:
This option will just display a message for each directory deleted succesfully.
No comments:
Post a Comment