I'm trying to run this BASH command in Popen:
find /tmp/mount -type f -name "*.rpmsave" -exec rm -f {} \;
But every time I get: "find: missing argument to `-exec'\n" in stderr.
What would the python equivalent of this be?
My naive aproach would be:
for (root,files,subdirs) in os.walk('/tmp/mount'):
for file in files:
if '.rpmsave' in file:
os.remove(file)
surely there is a better, more pythonic way of doing this?