On lfupdate there is function to get the difference between the files on the linuxfocus server and your harddisk. What you need:
Here is an example of how to use lfchkfiles for the German section:
run the command: lfchkfiles lfupdate Deutsch
Note: you are standing in front of the directory Deutsch/ and lfupdate is the output of an inspection of the german section saved as file in the current directory.
To just see the difference run the command:
lfchkfiles lfupdate Deutsch | egrep -v 'ok '| egrep -v 'missing locally'
This looks like:
>files differ in size: Deutsch/January1998/article2.html >files differ in size: Deutsch/January1998/article4.html >files differ in size: Deutsch/January1998/article5.html >files differ in size: Deutsch/January1999/article21.html >files differ in size: Deutsch/January1999/article4.html >files differ in size: Deutsch/May1998/article16.html >WARNING: file on server has size < 100 bytes: Deutsch/News/index.html >files differ in size: Deutsch/index.html >files differ in size: Deutsch/indice.html >missing on the server: Deutsch/Archives/lf-de-january1999.tar.gz >missing on the server: Deutsch/January1998/Makefile >missing on the server: Deutsch/January1998/example1.c >missing on the server: Deutsch/January1998/example2.c >missing on the server: Deutsch/January1998/example3.c ---------------- 0 files missing locally 5 files not on www.linuxfocus.org 8 files are equal in name but differ in size 369 files are equal in name and in size 1 files on www.linuxfocus.org with less than 100 bytes
To get the file name that need updating you run
lfchkfiles lfupdate Deutsch | egrep -v 'ok ' | egrep -v 'missing locally'|
grep ':' | sed -e 's/.*: //'
This gives you:
Deutsch/January1998/article2.html Deutsch/January1998/article4.html Deutsch/January1998/article5.html Deutsch/January1999/article21.html Deutsch/January1999/article4.html Deutsch/May1998/article16.html Deutsch/News/index.html Deutsch/index.html Deutsch/indice.html Deutsch/Archives/lf-de-january1999.tar.gz Deutsch/January1998/Makefile Deutsch/January1998/example1.c Deutsch/January1998/example2.c Deutsch/January1998/example3.c
To build a tar archive you just need to put the previous command into
back-quotes:
tar zcvf patch.tar.gz `lfchkfiles lfupdate Deutsch | egrep -v 'ok '|
egrep -v 'missing locally' | grep ':' | sed -e 's/.*: //'`
have fun.
Page Maintained by: Guido Socher