[lug] rsync to explore file system differences?

Stephen Queen svqueen at gmail.com
Thu Feb 5 10:23:41 MST 2015


How about writing a quick and dirty script that can be executed by find
that does a diff. You could just dump the results of diff to /dev/null and
output a message when the files differ, or output a message when they're
the same.

On Thu, Feb 5, 2015 at 9:01 AM, Quentin Hartman <qhartman at gmail.com> wrote:

> You could make a multi-pass system. Have it skip /dev and handle that
> independently. Really, do you need to do anything with it? It's not really
> a fs, so I wouldn't think it would be part of your image anyway. In any
> case, if you do need to worry about it, it's small enough to tackle alone.
> As far as hard links are concerned, a second step with find just looking
> for files with multiple links would pull out all your hard links relatively
> quickly. This page illustrates a number of approached to dealing with links
> that might be useful to you:
> http://linuxcommando.blogspot.com/2008/09/how-to-find-and-delete-all-hard-links.html
>
> In any case, that's how I'd approach it.
>
> QH
>
> On Wed, Feb 4, 2015 at 7:11 PM, <stimits at comcast.net> wrote:
>
>> ...
>> > I would write a shell script around "diff --brief --text --recursive
>> --new-file "$OLD_FS" "$NEW_FS""
>> >
>> > Save that output into a variable then pipe into a "while read" loop,
>> and you can do different things with each line depending on what the status
>> is.
>>  ...
>>
>> This would be perfect if diff understood symbolic links and device
>> special files (in terms of hard files the diff output is nice...although I
>> still need time stamps equal as well). I would still need a front end that
>> understands hard/soft link, device special files, permissions, and time
>> stamps. I'm not a system administrator so I don't pay a lot of attention to
>> special backup and restore schemes, but it almost seems like I need a
>> non-rsync backup and restore modified to not really backup and not really
>> restore. If I invent something myself it won't be available on a "normal"
>> desktop linux PC. I keep going back to rsync to figure out a way with that,
>> but it's one of those cases where it isn't really sane to keep trying the
>> same thing and hope the result changes.
>>
>> _______________________________________________
>> Web Page:  http://lug.boulder.co.us
>> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
>> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>>
>
>
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20150205/6dac3200/attachment.html>


More information about the LUG mailing list