I would like to delete 100k files and I use:
rm *.tif
Then I got:
bash: /usr/bin/rm: Argument list too long
So I tried:
find . -name '*.shp' | xargs rm -f
Then I got:
find: ‘./inaccessible’: Permission denied
How to solve the problem?
I would like to delete 100k files and I use:
rm *.tif
Then I got:
bash: /usr/bin/rm: Argument list too long
So I tried:
find . -name '*.shp' | xargs rm -f
Then I got:
find: ‘./inaccessible’: Permission denied
How to solve the problem?
Try with sudo find . -name '*.shp' -print -exec rm {} \; and let me know if it worked.
Regards.