Recently, I checked the log folder of my automatic reconnection script
There are too many files, and the rm
command prompts that there are too many parameters to execute.
So I wrote a Python script to delete the files.
import os
for pathname,dirnames,filenames in os.walk('/root'):
for filename in filenames:
if 'net.log' in filename:
file=os.path.join(pathname,filename)
os.remove(file)
print("OK")