Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从 python 内部执行一个复杂的 shell 命令。天真的尝试:
subprocess.call(["find", ".", "-exec touch {} \;"], cwd=".")
失败了。我该怎么做呢?
subprocess.call(["find", ".", "-exec", "touch", "{}", ";"])
cwd="." 不需要,因为它是默认设置。