Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I cannot delete folder created by php mkdir

for I in `echo $*`
    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 {} \;**

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

share|improve this question
also asked on stackoverflow: – glenn jackman Mar 27 '12 at 21:42
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

You must log in to answer this question.

Browse other questions tagged .