Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I cannot delete folder created by php mkdir

for I in `echo $*`
do
    find $I -type f -name "sess_*" -exec rm -f {} \;
    find $I -type f -name "*.bak" -exec rm -f {} \;
    find $I -type f -name "Thumbs.db" -exec rm -f {} \;
    find $I -type f -name "error.log" -exec sh -c 'echo -n > "{}"' -f {} \;
    find $I -type f -path "*/cache/*" -name "*.*" -exec rm -f {} \;
    **find $I -path "*/uploads/*" -exec rm -rdf {} \;**
done
done

I want to delete under /uploads/ all files and folders please help me thanks...

share|improve this question
    
also asked on stackoverflow: stackoverflow.com/q/9897049/7552 –  glenn jackman Mar 27 '12 at 21:42
1  
Does the script runner have write permissions on */uploads/*? –  Explosion Pills Mar 27 '12 at 21:46
    
Do NOT crosspost same question on different sites, unless it asked explicitly. You have answer on SO –  Lazy Badger Mar 28 '12 at 6:56

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.