Re: How can I delete directories that are not empty?
From: Robert Hull (Robert_at_please.do-not-spam.me.uk)
Date: Mon, 1 Sep 2003 18:08:17 +0100
In message <firstname.lastname@example.org>, Barry OGrady
>On Sat, 30 Aug 2003 19:28:30 +0300, "PM" <email@example.com> wrote:
>>On Sun, 31 Aug 2003 01:11:55 +1000, Barry OGrady wrote:
>>> On Tue, 29 Jul 2003 13:41:17 GMT, takashi <firstname.lastname@example.org> wrote:
>>>>Hi. I have had troubled deleting directories that are not empty. When I
>>>>use a command " rmdir directoryName ", bash complains that the directory
>>>>is not empty. Do I have to delete all the files inside the directory
>>>>first? But how can I delete all the files with one command? I really
>>>>don't want to delete one file at a time, using " rm fileName".
>>>> Thank you, and have a good day.
>>> rm *
>>> Web page: http://members.optusnet.com.au/~barry.og
>>> Atheist, radio scanner, LIPD information.
>>> Voicemail/fax number +14136227640
>>Did you really mean rm * ?
>>Won't that do just a little bit more than intended?
>You are right. What about rm dirname?
That will fail if the directory is not empty unless you use either -r or
--recursive to remove the files in the directory recursively.
If you are root, you can use -d to remove the directory whether empty or
not but I do not know what happens to the files in that directory in
-- Robert This information provided free of charge for those willing to accept it. Others who wish to be spoon-fed may acquire my services at the discounted rate of 80 GB Pounds per hour or part thereof.