answersLogoWhite

0


Best Answer

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.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What command is used to create a suddirectory and change the current directory and to remove a subdirectory?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What command creates a sub directory under a directory?

Mkdir command creates a subdirectory under a directory (MD creates a directory) . The command Chdir changes the current Default directory(CD changes the current directory). The Rmdir removes the subdirectory(RD removes a directory).


What is the Linux command for displaying a working directory?

The command pwd displays your current/present working directory.


How will you CD to the parent directory of current directory in Linux?

Use the following command: cd .. The ".." indicates the parent of the current directory


In Linux what are three commands you can use to create a subdirectory?

1. The most straightforward way to create a create a subdirectory in the current directory is mkdir name where name is the name of the new directory. 2. Another way is to move a directory and its descendants from somewhere else: mv path name where path is an absolute or relative pathname for an existing directory hierarchy, and name is the directory name it will be given in the current directory. 3. Various utilities for unpacking archives may create directories as they execute; for example cpio, tar, unzip etc.


What does an absolute path-name look like in Linux?

It is the path as relative to the topmost directory, /. For example, /usr/bin is absolute, but ../bin is relative (Means "the directory 'bin' in the parent of the current directory.")


Which command list the content of current directory?

dir


What command do you use to change the directory in DOS?

cd 'cd dirname' (without the quotes) takes you to a directory named dirname if it exists in your current location. 'cd..' takes you up one position to the parent directory to the one you're in now. 'cd\' takes you all the way back to the root directory of the current drive (like c . You can navigate a complete path in one command. For instance, if you wanted to get to the directory named files that was in one named main which was in one named top, you could type: cd\top\main\files then if you typed: cd.. you would end up in the 'main' subdirectory.


What is the command that will change the current default directory to the root directory in Unix?

CD /


How do you find absolute path name of your home directory what is it on your system?

All you need is the PWD(Print Working Directory) command, this will list your current directory absolute path All you need is the PWD(Print Working Directory) command, this will list your current directory absolute path


How do you identify the working directory in Linux?

The command 'pwd' will identify the full path of the present working directory.


What command line is used to change the current directory?

cd dirReplace "dir" with the name of your directory.


What would you type at a command prompt to execute a program called sampleprog in your current directory if the current directory is not in your path statement?

./sampleprog