Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/python3
- import gzip
- import glob
- gzippedfiles = list(glob.glob("access.log*.gz"))
- with open("accesscompiled.log", "wb") as outfile:
- with open("access.log", "rb") as infile:
- outfile.write(infile.read())
- with open("access.log.1", "rb") as infile:
- outfile.write(infile.read())
- for gzippedfile in gzippedfiles:
- with gzip.open(gzippedfile, "rb") as infile:
- outfile.write(infile.read())
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement