rmdir when directory is not empty

Daniel B. Thurman dant at cdkkt.com
Tue Dec 20 18:37:33 UTC 2005


>From: fedora-list-bounces at redhat.com
>[mailto:fedora-list-bounces at redhat.com]On Behalf Of Chasecreek
>Systemhouse
>Sent: Tuesday, December 20, 2005 10:28 AM
>To: For users of Fedora Core releases
>Subject: Re: rmdir when directory is not empty
>
>
>On 12/20/05, Mogens Kjaer <mk at crc.dk> wrote:
>
>> > That won't work on directories that have tens of thousands 
>of files.
>>
>> Why not?
>>
>> As long as you don't do a:
>>
>> rm -f /dir/folder-with-many-files/*
>>
>> that, of course won't work, but
>>
>> rm -rf /dir/folder-with-many-files
>>
>> should work.
>
>
>Have you tried it?  rm will fail because the shell cannot keep track
>of that many;
>the find cmd works because it deals with one file at a time.

I have tried it many times.  I have deleted the entire copy
of a copy of / (yes, a copy of root which is some 8GB worth
of files) so if this fails for you, perhaps you do not have
enough memory, virtual or otherwise.  It is possible that you
may run out of memory but it has not happened to me at this
time. Maybe your mileage may vary as not all systems are the
same :-)

>
>--
>WC -Sx- Jones | http://ccsh.us/ | Open Source Consulting
>
>-- 
>fedora-list mailing list
>fedora-list at redhat.com
>To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
>
>-- 
>No virus found in this incoming message.
>Checked by AVG Free Edition.
>Version: 7.1.371 / Virus Database: 267.14.1/207 - Release 
>Date: 12/19/2005
> 
>

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.1/207 - Release Date: 12/19/2005
 




More information about the fedora-list mailing list