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
Post a Comment