linux - find command in python failing with "missing argument to -exec" -


i trying find files older number of days , remove them

subprocess.call(['find', directory, '-mtime', '+5', '-exec', 'rm', '{}', r'\ ']) 

why call giving me missing argument -exec error message

while using exec, need semicolon indicate end of command.

subprocess.call(['find', directory, '-mtime', '+5', '-exec', 'rm', '{}', ';']) 

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -