find command
hi all,
In dir1 and dir2 directories I have same subdirectories DH* like --root + dir1 | | + dir2 How to force find command to remove all "*.jpg" files (that are inside DH*) from root. This does not work find DH* -type f -name "*.jpg" -exec rm {} \; thanks oliver |
Try this command:
Quote:
Sorry, misunderstood your post. In bash, the command that you posted should work as expected. Are you using another shell? |
no response to this command ... nothing happens
|
Quote:
|
yes thanks....it works
I read in man for find that regexp can be used but no example is given. google is also poor with examples. My guesing of how it should be writen does not work (for example to -exec only files that begin with t) find dir1/DH* dir2/DH* -type f -regex /^t/ -exec rm {} + Could you provide me an example or two? thanks |
what's wrong with
rm dir?/DH*/*.jpg ??? |
All times are GMT -5. The time now is 03:44 PM. |