---
name: "getls-lR"
section: "1"
platform: "linux"
package: "mirror"
version: "2.9-55"
release: "Debian 6.0 (Squeeze)"
platforms: ["linux"]
url: "https://new.carta.tech/getls-lR"
---

# getls-lR(1)

get ls-lR files from FTP server for mirror use

## NAME

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

## SYNOPSIS

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

## DESCRIPTION

**getls-lR**, **getls-lR.exp** and  **getls-lR.pl** 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 **README.ls-lR** 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  **ftp.pl** and  **lchat.pl** 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.

**getls-lR.pl** is a perl script which uses   **Net::FTP** and  **Net::Netrc** from the standard perl library and GNU **gunzip** and **patch**.

## EXAMPLE

**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 ctan.unsw.edu.au /pub/ls-lR /home/ftp/pub/remote\_ls-lR**

  Download **ls-lR.times** from **ctan.unsw.edu.au** 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**.

## OPTIONS

- **--help**

  Display help message then exit.

- **--version**

  Display version and copyright message then exit.

## SEE ALSO

[**mkls-lR**(1)](/mkls-lR/1.md), [**cron**(8)](/cron/8.md), [**crontab**(1)](/crontab/1.md), [**mirror**(1)](/mirror/1.md), [**ftp**(1)](/ftp/1.md), [**ftpd**(8)](/ftpd/8.md), [**ls**(1)](/ls/1.md), [**diff**(1)](/diff/1.md), [**gzip**(1)](/gzip/1.md), [**date**(1)](/date/1.md), [**at**(1)](/at/1.md), [**tzset**(3)](/tzset/3.md), [**wu-ftpd**(8)](/wu-ftpd/8.md).

**mirror-lslR.html** describes how Lee McLoughlin's Perl script **mirror** can use **ls-lR.patch.gz** and **ls-lR.times**.

## AUTHOR

Ian Maclaine-cross  14th September 1999
