Berkeley CSUA MOTD:Entry 45114
Berkeley CSUA MOTD
 
WIKI | FAQ | Tech FAQ
http://csua.com/feed/
2025/07/08 [General] UID:1000 Activity:popular
7/8     

2006/11/2-3 [Computer/SW/Unix] UID:45114 Activity:nil
11/02   I have a bunch of directories with files (and other directories)
        in them. I have a mirrored copy that contains many of the same
        files, but with different dates. Is there an easy way (short of
        writing s/w to check each file against the other) to do something
        like : If date on mirror < 10/31, then sync date with other dir?
        I don't think rsync can help with this. I just need the dates
        changed, not the contents of the files. Changing the contents
        could actually be bad.
        \_ Why would you want to do this?  (Curious, and it might help to come
           up with a better solution)
        \_ Does one line of perl count as "writing s/w"?
        \_ find; grab time stamp; stamp matching file
           \_ The catch is that a checksum needs to be done at some point.
              Obviously, you could add a step to checksum in there, too. I was
              just wondering if there's a utility to do this. Essentially,
              I want rsync, but to have rsync only change dates and not
              contents. If you read the rsync man page, you will see that
              rsync has a lot more options than find for deciding when to
              do what.
              \_ What role does the checksum play in this? Are you trying to
                 do something more than set the timestamp on /mirror/file to
                 the timestamp on /primary/file if the timestamp on/mirror/file
                 is more than N days old, or something more complicated?
              \_ If you're really too lazy to write something trivial in perl,
                 you could use rsync with the -n option to find the relevant
                 files, and pipe that to xargs/foreach.  -tom
                 \_ I broke down and did this. It was not too bad. Thanks.
2025/07/08 [General] UID:1000 Activity:popular
7/8     

You may also be interested in these entries...
2009/8/21-9/1 [Computer/SW/Unix] UID:53297 Activity:nil
8/20    When I use rsync to backup, it's pretty cool except in cases where
        I rename a directory name from the source. Rsync will just do
        a plain copy. Is there a program that'll detect renaming of
        directories (by checking for children files), or at least
        move them to a dated directory?
        \_ Not related but beware of using rsync as a backup tool.
	...
2009/7/17-24 [Computer/SW/OS/OsX] UID:53156 Activity:kinda low
7/17    -rw-r--r--@
        What does the "at sign" mean? This is on Mac OS. VMWare disk file.
        \_ The file has metadata attributes
           \_ How do I add/delete attributes to files? What about
              -rw-r--r--+ <-- what is the "+" sign? Also how do you make
              tar preserve these attributes?
	...
2009/2/26-3/5 [Computer/SW/Unix] UID:52653 Activity:nil
2/26    If I want to rsync a perforce or svn directory while users
        are checking things in, could I wind up with a corrupted copy?
        \_ sure why not.  if you are really cool, your copy of the svn
           repo is on LVM, and you snap the LVM to copy it.
           \_ It'll seem less cool when you realize you've taken a snapshot
              of a block level device, which only guarantees that this set of
	...
2008/8/27-9/3 [Computer/HW/Laptop, Computer/SW/OS/Linux] UID:50980 Activity:nil
8/27    I have a rather large linux partition.  I just got a new laptop
        and want to move all my settings and customization to that new
        computer.  how to do this?  I tried remastersys but it seems that it
        get stuck somewhere, and I am hoping it is not really trying to create
        a 26GB iso file.
        any ideas?  is there anyway i can back up my debian package database
	...
2008/6/10-13 [Computer/SW/OS/VM, Computer/SW/Unix] UID:50210 Activity:nil
6/10    Is there a handy guide to virtualizing an already running
        physical linux box into an instance of Vmware?
        \_ this probably isn't the "right" way, but I have many times
        just run rsync. ("rsync -vpa root@oldbox:/ /")  on a fresh virtual
        image.  Just make sure the partitions are the same on the virt disk
        as on the real disk and if you are using a new udev, kill the info
	...
2008/5/29-31 [Computer/HW/Drives] UID:50086 Activity:nil
5/29    Considering abandoning tape backups in favor of something like this:
http://www.thermaltakeusa.com/product/Storage/hdd_station/blacx/st0005u.asp
        Please convince me that I'm crazy.
        \_ why?
           \_ Why do I want you to convince me I'm crazy?
              \_ what are you trying to accomplish?  What is your context?
	...
2008/4/3-9 [Computer/SW/Mail, Computer/SW/RevisionControl] UID:49661 Activity:nil
4/3     In "p4 client", modtime/nomodtime sets the file timestamp to
        either the modification time from submitting client or the time that
        the file is fetched.  Is there a way to set the file timestamp to
        the time that the file was submitted, like what ClearCase does?  Thx.
        \_ How is this different from the modtime option? Are you concerned
           about clock skew or timezone differences?
	...