linux - Delete a file "older than" in a zip archive -


i archiving once month file 10 mb , emailing it. next month, need delete previous months file in archive , add new one. way keep space low. other unarchiving , searching , archiving, haven't found way it!

the filename ends date of last month. filename20130430.csv , date variable date.

any ideas?

if you're using info zip, can selectively delete files archive "-d", eg:

zip -d archive.zip filename201304\*.csv 

you can delete files depending on modification date (note date format either mmddyyyy or yyyy-mm-dd), eg. delete csv files before may 1st 2013:

zip --before-date 05012013 -d archive.zip \*.csv 

and add file archive without option:

zip archive.zip filename20130531.csv 

Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

linux - Does gcc have any options to add version info in ELF binary file? -

java - Are there any classes that implement javax.persistence.Parameter<T>? -