Deleting the entire directory

Issues related to applications and software problems
Post Reply
hsalem935
Posts: 6
Joined: 2018/10/18 13:23:42

Deleting the entire directory

Post by hsalem935 » 2018/10/19 15:35:38

I would like to delete the entire directory but it seems that I can't do so till I remove the files.
Thanks

tunk
Posts: 1204
Joined: 2017/02/22 15:08:17

Re: Deleting the entire directory

Post by tunk » 2018/10/19 15:39:25

rm -Rf name-of-directory
NB: This is a powerful command, be sure you select the correct directory.

hsalem935
Posts: 6
Joined: 2018/10/18 13:23:42

Re: Deleting the entire directory

Post by hsalem935 » 2018/10/19 18:55:43

I sure will,,,,, Thank you

hsalem935
Posts: 6
Joined: 2018/10/18 13:23:42

Re: Deleting the entire directory

Post by hsalem935 » 2018/10/19 19:08:47

so if I want to remove this directory ,
here is the directory that I would like to remove RR20150202
So I just replace it with the directory name in the command that you recommended, is that correct?
rm -Rf RR20150202-of-directory

desertcat
Posts: 843
Joined: 2014/08/07 02:17:29
Location: Tucson, AZ

Re: Deleting the entire directory

Post by desertcat » 2018/10/20 06:22:17

A great Utility I can't seem to live without is Midnight Commander (mc). It is a file browser, editor, and other cool stuff. You can view the contents of any Directory, if if all there is in it is junk you don't want highlight the directory, then hit F8, it will then ask you if you want to Delete Yes/No, say Yes and it is gone and all the files in it. If there are files you want to save you can move them to another Directory, or create a NEW Directory.

To install Midnight Commander issue the command yum install mc.

lightman47
Posts: 1521
Joined: 2014/05/21 20:16:00
Location: Central New York, USA

Re: Deleting the entire directory

Post by lightman47 » 2018/10/20 12:23:36

get rid of that "-of-directory" at the end

;)

User avatar
TrevorH
Site Admin
Posts: 33191
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Deleting the entire directory

Post by TrevorH » 2018/10/20 13:25:53

An excellent guide for users that are new to Linux can be found at http://rute.gerdesas.com - while this is not official project documentation it is a well-regarded general introduction to Linux and may be of help. For an introduction to the bash shell take a look at http://linuxcommand.org/lc3_learning_the_shell.php
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

hsalem935
Posts: 6
Joined: 2018/10/18 13:23:42

Re: Deleting the entire directory

Post by hsalem935 » 2018/10/22 13:07:18

Thank you all for your great response

Post Reply