Quote:
Originally Posted by ghostdog74
yes, that's why rm -f */ is the simplest solution to his problem. No doubt about that.
|
Just to make it clear,
I don't think ls and awk are needed in the case you describe (argument list too long).
Code:
for d in */;do rm -r "$d";done
Or better (needs to be adjusted for xargs that doesn't support the null option):
Code:
xargs -0n1000 rm -r < <(printf "%s\000" */)
If you have zsh:
Code:
autoload -U zargs
zargs *(/) -- rm -r