Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- u = Ii::Person.find_by_slug('guest')
- old = u.artwork.select{|i| i.created_at < 2.weeks.ago }
- files = old.map{|i| i.source_image.path rescue nil}
- files.reject!{|f| f.nil? }
- folders = []
- files.each { |f| folders << f.split('/')[0,f.split('/').size-1].join('/') }
- sizes = []
- folders.map {|f| sizes << `du -s public#{f}` }
- sizes.map! {|s| s.split("\t")[0].to_i }
- kilobytes = sizes.sum
Add Comment
Please, Sign In to add comment