Unable to delete LARGE folder

Stephen W. Clarke stephenc-wtWqQT8woy8 at public.gmane.org
Wed Dec 7 16:26:49 UTC 2011


Thanks for the quick response!!

Ted:
> does it let you delete one file even?
Not sure as the directory is so big I can't get it to list the file names.

Len:
>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.

I'll give that a try next. I just decided to abandon the command prompt
and try to do this with the Gnome file manager (Nautilus?) It appears to
be working.

The folder is on a NAS unit so yes it is a mount.

James:
>Are there a lot of subdirectories?  Try just deleting the top level 
files first, without using recursion and see what happens.

There are no subdirectories.

Jamon:
>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

Thanks I'll give that a read.

Doing the delete from the GUI seems to be working.
Thanks again for all your suggestions.

Stephen

> 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
>


____________________
Stephen W. Clarke
Marketing and Communications Officer
Nray Services Inc.
56A Head Street
Dundas, ON L9H 3H7
CANADA

(905) 627-1302 x14








--
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