Could not able to delete the files through find command need expert advice

Hi Gurus

I am facing a problem, there is a folder called /a where there are lots of files which are occupying space anything between 30 GB to 100 GB as I am not able to check the space occupied by that folder through "du -sh /a" command as I don't see any output after more than 1 hour of running the command, I believe that it hung. Even I don't able to see the files listing after more than half an hour through ls -ltr command then I cancel the command. At the same tine I am 100% sure that files are contiously creating in that folder & every thing is at SAN storage level though LUN.

Now my main problem is that I need to free some space from that folder & we have made a policy that folder must contain last 6 month files but I believe that folder has files more than 1.5 year old. Now I need to delete the files. If I try to delete the files through find command at once which are older than last six month , it goes into hung & didn't delete the files

Kindly help me in this regard

You have too many files in one directory. All of those commands - ls, find, and so on: they all call readdir(). Show the output of

ls -ld  /a

The directory file itself is probably enormous. Which is why it takes forever to process.
The find, ls or whatever is NOT hanging up it is just grinding thru a ridiculously large directory.

hi.,
Maybe you have directories within directories and find is going into it and getting lost somewhere. lol
so add -maxdepth 1 to your find command and see it it doesnt make you wait for hours (choke). If it works out then go ahead and make it 2,3 etc. ..

Regards
Gaurav.

Is your /a a local mount point or its from an array Lun or it is NFS mounted?
When you did the command, and you said "hung", can you provided if there's any errors or warnings in the messages file ? (if any)

"BY Hung" he probably means to say that find wrote anything to stdout.Thought it may have been computing in the background.

I pretty much think that find was not able to reach the leaf of a directory(i.e. a file) .
So try with maxdepth and also try the -print0(if you think that it simply hung).

Regards