Unable to delete LARGE folder

Jamon Camisso jamon.camisso-H217xnMUJC0sA/PxXw9srA at public.gmane.org
Wed Dec 7 16:11:14 UTC 2011


On 12/07/2011 11:05 AM, Lennart Sorensen wrote:
> On Wed, Dec 07, 2011 at 10:57:53AM -0500, Stephen W. Clarke wrote:
>> Hello all,
>>
>> I'm stumped with what should be a simple issue.
>>
>> I have a folder that due to a coding error ended up with 280,000 files in
>> it. A total of about 3GB of junk.
>>
>> I tried to delete it using
>>
>> #rm -rf foldername
>>
>> but it produces this error:
>>
>> CIFS VFS: No response for cmd 50 mid 14xxx
>>
>> A google search suggested turning off the Opportunistic Locking with
>>
>> #echo 0 > /proc/fs/cifs/OplockEnabled
>>
>> and then re-running the rm command from above
>>
>> But that didn't help either.
>>
>> Any suggestions?
> 
> find foldername -print0 | xargs -0 -n 100 rm
> 
> Basicly, delete 100 things at a time.  It should tolerate that,
> shouldn't it?
> 
> Is this a local drive, or a network mount?  The error makes me suspect
> it is a windows drive remotely mounted.

xargs isn't the best way to delete things. find has the -delete option
for this, which avoids forking processes, and is portable across *NIX
versions of the tool, whereas xargs is apparently not:

http://www.gnu.org/software/findutils/manual/html_node/find_html/Deleting-Files.html

Jamon
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list