Why can't xargs delete directories with spaces in their names, and how to fix that?
76 find . -type d |xargs rm -rf
77 rm -rf fire\ hydrant/
78 rm -rf wine\ glass/
79 rm -rf tennis\ racket/
80 rm -rf traffic\ light/
81 rm -rf parking\ meter/
82 rm -rf teddy\ bear/
83 rm -rf sports\ ball/
84 rm -rf cell\ phone/
85 rm -rf stop\ sign/
86 rm -rf dining\ table/
87 rm -rf potted\ plant/
find
's implemented-delete
option? – FelixJN Oct 26 '16 at 21:28find
will execute from left to right, so a-delete
placed too early will result in too many files being deleted. – FelixJN Oct 26 '16 at 21:31