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
Post a Comment