I have seen other threads about deleting a certain extension in a directory. However, when I try it, it seems to work but takes a long time to go through directories and say "Permission denied" on the system ones. All I want is a bash script that goes through the entire computer, or part of it, and deletes a certain extension. If python would be faster that is fine.
migrated from stackoverflow.com Dec 21 '12 at 4:20
This question came from our site for professional and enthusiast programmers.
using xargs, assuming you have GNU find and xargs:
This method uses the null char
|show 2 more comments|
You could just use find I guess.
But of course, searching a whole HDD (or partition..) from / is a long thing to do, and you will get permission denied errors as long as you're not running this as root.