answersLogoWhite

0


Best Answer

Assuming the directory is in your Home directory use: rmdir directory-name

This will fail if there are files within the directory. In this case, use rm -r directory-name.

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

8y ago

rmdir.

********

rmdir will only delete an empty directory. rm -r will delete the files and the directory.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the command is used to remove directory in Linux?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the Linux command used to list the contents of a directory?

ls will list the contents of a directory.


What is the full form of rd command?

"rd" is a command which is "Remove directory" and the full form of the command would be "rmdir" depending on the OS used. It's commonly associated with UNIX or Linux based OS's.


What is command in DOS?

RD command is used to remove a directory (folder).


What is RD command in MS-DOS?

RD command is used to remove a directory (folder).


What are the common Linux commands?

In my opinion, the most commonly used Linux commands are: ls - list files and folders in a directory CD - change directory mkdir - make a directory cp - copy mv - move/rename rm - remove man - manual pages find - um, find Having a good command of all of these and you should be able to navigate around in the command line comfortably.


Can command rmdir can be used to delete a directory that is not empty?

the commandrmdir will not remove a directory if it is not empty in UNIX. The correct way to remove a directory and all its contents recursively is with the rmcommand.


What command is used to remove an RPM package from Linux?

yum remove -y (specific package name)


What command is used to create a suddirectory and change the current directory and to remove a subdirectory?

If for example we wanted to make i subdirictory called foo in Linux or UNIX it you use mkdir foo to change into it you would use CD foo to remove the directory rmdir foo but this will only work if the directory is empty to remove the directory called foo when it is not empty use rm -rf foo but please be sure this is what you really want to do.


What Linux command is used to zip only a subdirectory?

In order to zip a subdirectory in Linux you would use the zip command with the recursive flag to specify that it should add all files under that directory into the zip file. The command would then be zip -r .zip .


What is the Linux Filesystem hierarchy used for?

The Linux Filesystem Hierarchy is used to help determine the file structure in the Linux Operating System. It defines the Directory structure and directory contents.


What Linux command sets a files permission?

In Linux the chmod command is used to set file permissions.


Which MS-DOS command is used to delete a directory and its sub directories in one pass?

To delete directory and sub directory in single command, use "deltree" command..