×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Bash
Posted by: Roman Ignatov
Added: Nov 22, 2016 4:34 PM
Views: 5
Tags: console
  1. # find and backup and then remove all files with modified date till 2014 started etc
  2. find . -not -newermt 20140101 -type f -print0 | xargs -0 tar -cvzf ./backup_2013.tar.gz && find . -not -newermt 20140101 -type f -delete
  3. find . -not -newermt 20150101 -type f -print0 | xargs -0 tar -cvzf ./backup_2014.tar.gz && find . -not -newermt 20150101 -type f -delete
  4.