Giter Club home page Giter Club logo

s3cleaner's People

Contributors

jordansissel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

s3cleaner's Issues

How to clean files OLDER THAN a few days

Hi. I am not interested in a regexp search to match files against. I want to delete files + folders older than certain days. How is this done through this script? The help is sparse, thanks for any specific tips!

When local system timezone is not set to GMT --max-age parameter doesn't work as expected

S3 returns the last_modified date in GMT, if the local system has a timezone different from GMT, the following lines will produce undesired behavior.

mtime = time.mktime(time.strptime(key.last_modified.split(".")[0], "%Y-%m-%dT%H:%M:%S"))
now = time.time();

mtime will be relative to GMT where now will be relative to the users localtime which makes the behavior of the --max-age parameter somewhat unexpected. To fix this, the local time should be calculated in the same timezone as mtime which can be done by replacing the second line with this.

now = time.mktime(time.gmtime())

Syntax Errors?

I'm receiving syntax errors everywhere with this app. Even when I just try to view the usage:

# python s3cleaner.py --help
  File "s3cleaner.py", line 55
    print "Deleting: s3://%s/%s" % (bucket.name, key.name)
                               ^
SyntaxError: invalid syntax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.