How to remove large number of files/folders in linux

Posted by user1745713 on Super User See other posts from Super User or by user1745713
Published on 2013-10-29T15:49:35Z Indexed on 2013/10/29 15:59 UTC
Read the original article Hit count: 242

Filed under:
|
|
|

We are using hadoop to split a table into smaller files to feed to mahout, but in the process, we created a huge amount of _temporary logs.

we have an nfs mount for the hadoop volume so we can use all the linux commands to delete folders files, but we just can't get them to be deleted, here's what I've tried so far:

hadoop fs -rmr /.../_temporary  : hangs for hours and does nothing

on nfs mount:

rmr -rf /.../_temporary :hangs for hours and does nothing

find . -name '*.*' -type f -delete : same as above

the folders look like this (38 of these folders inside _temporary):

drwxr-xr-x 319324 user user 319322 Oct 24 12:12 _attempt_201310221525_0404_r_000000_0

the content of these are actually folders, not files. each one of those 319322 folders has exactly one file inside. not sure why the do the logging this way.

Any help is appreciated.

© Super User or respective owner

Related posts about linux

Related posts about delete