3
I'm trying to create a "changed files" package from one directory to another and need to find a Linux/Unix tool/utility that will be able to handle this.
Example:
- Package_1.1/ (old)
- Package_1.2/ (new)
- changed_files/ (only changed and new files and directories)
changed_files
would be a directory containing a recursive structure of only files that have been added or changed in Package_1.2
compared to Package_1.1
)
Update: I tried using:
cd Package_1.2
rsync -a -c --compare-dest=../Package_1.1 . ../changed_files/
find -depth ../changed_files -type d -empty -delete
However there were some files that had a slightly different modified time that were copied over, yet the contents were identical. (md5 produced an identical checksum on each file). So while I think I'm close using this command, I'm still missing something.
To be clear, you want to copy files from
Package_1.2
that are different from those inPackage_1.1
into a new directory maintaining the same directory structure? – Thor – 2012-07-27T19:38:12.520@Thor, that is correct. – Highway of Life – 2012-07-27T19:44:18.443