Move changed files to a separate directory (Linux)

I have previously used hardlinking and rsync to backup my systems. I now have a lot of hardlinked directories with almost the same content in folder structures such as etc.0, etc.1 etcetera (etc.0 being the newest) up to 60.

Cleanup script follows:

#!/bin/bash
 
for i in {1..60}
do
        rsync -a --verbose --compare-dest=../etc.$((i-1)) etc.$i/ etc.diff.$i
        find etc.diff.$i -depth -type d -empty -delete
done

One thought on “Move changed files to a separate directory (Linux)

  1. I must say it was hard to find your website in search
    results. You write interesting content but you should rank your blog higher in search engines.
    If you don’t know 2017 seo techniues search on youtube: how to rank a website Marcel’s
    way

Leave a Reply

Your email address will not be published. Required fields are marked *