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? -

keyboard - C++ GetAsyncKeyState alternative -

android - java.net.UnknownHostException(Unable to resolve host “URL”: No address associated with hostname) -