LSDIF

a (plan9) c program that compares ls -lp outputs


tags

architectural
green
plan9
safe
utility

[lsdif src]

The naive approach to comparing remote system files for modifications is very slow. (test $x -nt $y) This may be fine for a single file, but if needing to test (f in *) this will be horrible.

In order to reduce network transfer overhead, it's much faster to rcpu into the remote system and have it write ls -lp of the directory in question to a directory the host system can read. (or just write it to stdout and redirect it to file on host).

If you are needing to do this or something like this you are probably using git to do it. There are a few reasons it doesn't really work for me.

just untargz the src, then cd in and mk; mk install;

a real example of use in [updategemini]

example useage: rimport remote /path/to/dst/.. /n/rem rcpu -c 'cd dst; ls -lp' > /tmp/dst cd src ; ls -lp > /tmp/src files=` {lsdif /tmp/src /tmp/dst} clone src/^$files /n/rem/dst/. .

incoming references

F 00144 FAST UPDATES
INDEX
MUFFET