Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
-type f is going to find regular files. You want -type d if you are using find to locate folders – Matt Oct 29 '13 at 15:55
Just a little comment on @Matt's suggestions: -name '*.*' is not needed if you used just -type d, maybe I would use something like this: find . -type d -delete or find . -name "_temporary" -delete (depending on the exact case, maybe there are files which shouldn't be deleted). – noggerl Oct 29 '13 at 16:27
tried it, it hangs forever and doesn't delete the files :/ – user1745713 Oct 29 '13 at 18:33

Does an rm, rm -r, or rmdir work on the individual file or directory respectively?

If so, I'll bet you're waiting on NFS to sort the 319222 folder names and present them alphabetically. Try ls -f | xargs rm -r

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.