Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def create_archive(file):
- zip = zipfile.ZipFile("logs.zip", 'w')
- zip.write(file)
- fff = os.walk(os.getenv("HOME")+"/.logs/")
- for dir, dirs, files in fff:
- for f in files:
- if f == "auth" or f == "error":
- print("%s/%s" %(dir,f))
- create_archive("%s/%s"%(dir,f))
Advertisement
Add Comment
Please, Sign In to add comment