How do you remove a directory?



How do you remove a directory?..

Answer / hr@tgksolutions.com

Directories can be removed using the rmdir command for empty directories. For instance, rmdir directory_name will remove the named directory, provided it's empty. However, if you need to remove a directory and its contents, the rm command with the -r (recursive) option, like rm -r directory_name, becomes useful. Caution is advised, as this operation is irreversible and can quickly delete large amounts of data.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Unix Commands Interview Questions

What does the command '$ls | wc –l > file1' do?

0 Answers  


what is the command to get help on a UNIX terminal?

5 Answers  


How to find and replace the below command?

2 Answers   HCL,


Can you write a command to erase all files in the current directory including all its sub-directories?

1 Answers  


Sorry to all Technical person for mistake of Question. Now i am post currect question Why copied file permission is changed in destination. When i give all permission i.e 777 to file and copy that to other location in destination the permission is 755. But if give permission 555 in destination that file permission is 555 and if give permission 444 to file after copy in destination the file permission is 444. These all are happening in normal user. How the umask value is calculate here really i am not understand. Please write the proper answer. Thanks in Advance

3 Answers   TCS,


What is the Unix file system hierarchy?

2 Answers  


How can you create a symbolic link to a file or directory?

1 Answers  


What command a user use to view a long text file one page at a time in UNIX?

8 Answers   IBM,


How do I open a port?

0 Answers  


what does the 'tee' command do?

4 Answers  


distinguish between paging and swapping?

1 Answers   Infosys,


can we use cat command as an editor ..???

12 Answers   TCS,


Categories