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.
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
|
migrated from stackoverflow.com Dec 21 '12 at 4:20
|
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. |
|||||||||||
|
|
using xargs, assuming you have GNU find and xargs:
This method uses the null char |
|||||||||||
|