|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: Hey, the Macintosh bloggers rock more than the Linux bloggers; AUUG 2005 Call for papers closes soon; Building a symlink tree for MythTV recordings; Slashdot, Google and Slack; I think I found a bug in python's unittest.mock library; A momentary crisis of faith, and who am I anyway?
posted at: 13:54 | path: /rsync | permanent link to this entry