getls-lR(1) get ls-lR files from FTP server for mirror use


getls-lR [--help] [--version] SITE RPATH LPATH


getls-lR, getls-lR.exp and are three example scripts each of which perform the same function but using different libraries or languages. They are examples of how to use the ls-lR files generated on remote FTP servers by mkls-lR to keep a local copy of the remote directory listing up to date with minimal download volume. Your FTP mirror program or script must be able to use such a local copy or be modified to use it before getls-lR is useful.

These scripts log into FTP server SITE anonymously or from a ~/.netrc file, request the file RPATH.times and then from this and file LPATH decide whether to: do nothing as LPATH is up to date; get RPATH.patch.gz and patch LPATH; or FTP RPATH.gz and replace LPATH.

Please see for details of patches to allow version 2.9 of Lee McLoughlin's perl script mirror to use these ls-lR files. getls-lR and workalikes are for systems which do not have Lee's mirror 2.9 or cannot use it and as an example of how to modify a mirror program to use mkls-lR's output like mirror 2.9 can.

getls-lR is a perl script which uses Lee McLoughlin's and from directory /usr/lib/mirror Linux hostname and GNU gunzip and patch.

getls-lR.exp is an expect script which uses an ftp client program and GNU gunzip and patch. It is the fastest and uses the least memory of the three scripts. is a perl script which uses Net::FTP and Net::Netrc from the standard perl library and GNU gunzip and patch.


getls-lR would normally be started by cron several times a day to ensure the local copy of the remote ls-lR is up to date when the local mirror program wishes to use it.

getls-lR /pub/ls-lR /home/ftp/pub/remote_ls-lR
Download ls-lR.times from directory /pub and then do nothing or download either ls-lR.patch.gz and patch or ls-lR.gz and replace local file remote_ls-lR in local directory /home/ftp/pub.


Display help message then exit.

Display version and copyright message then exit.


Ian Maclaine-cross 14th September 1999