Very large directory

Dan Nelson dnelson at allantgroup.com
Wed Jan 19 23:01:16 PST 2005


In the last episode (Jan 19), Phillip Salzman said:
> I have a pair of servers that act as SMTP/AV gateways.  It seems that
> even though we've told the AV software not to store messages, it is
> anyway.
> 
> They've been running for a little while now - and recently we've
> noticed a lot of disk space disappearing.  Shortly after that, a
> simple du into our /var/spool returned a not so nice error:
> 
> 	du: fts_read: Cannot allocate memory
> 
> No matter what command I run on that directory, I just don't seem to
> have enough available resources to show the files let alone delete
> them (echo *, ls, find, rm -rf, etc.)

Try raising your datasize rlimit value; also see the thread
"Directories with 2 million files" at
http://lists.freebsd.org/pipermail/freebsd-current/2004-April/026170.html
for some other ideas.  "find . | xargs rm" sounds promising.

-- 
	Dan Nelson
	dnelson at allantgroup.com


More information about the freebsd-stable mailing list