I want to remove some log files of my App server without shutting down my server. What command can I use to do this using Python, like rm -rf
in Linux systems?
Please help.
shutil is your friend in this instance.
http://docs.python.org/2/library/shutil.html#shutil.rmtree
import shutil
shutil.rmtree("/my/path/to/folder/to/destroy")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With