|Rsyncing everything but the data|
Imagine that you have a large collection of data files, and you want to run a script which deletes some of them. Wouldn't it be cool if you could have rsync copy the files, permissions and everything else -- but not the data in the files? It would be really fast, and then you would need to have heaps of disk on the test machine.
Update: So, it turns out there is a nice way of doing this... How about something along the lines of:
find . -type d -fprintf /tmp/listing "mkdir -p %p\n" find . -type f -fprintf /tmp/listing2 "touch -t %AY%Am%Ad%AH%AM.%AS %p\n" ...change to the target directory... chmod 711 /tmp/listing /tmp/listing2 /tmp/listing /tmp/listing2
I am sure this can be made nicer too...
Tags for this post: rsync unix administration script testing
Related posts: Why does every man and his dog put man pages online?; A momentary crisis of faith, and who am I anyway?; Starfish Prime; netcat vs nc; Cubicle wall; init script
posted at: 13:54 | path: /rsync | permanent link to this entry