ViMan
10-14-2003, 11:30 PM
I frequently visit FTP sites which contains dozens/hundreds of folders and nested folders. I was wondering if there was an FTP client (or any other program) that can mirror the FTP site without downloading the files so that I can browse the contents of the site offline and put the desired files in a wget script for retrieval when I get back online. Thanks...
hard candy
10-15-2003, 10:15 AM
From "man ncftp". Hope this helps:
get
The get command lets you retrieve entire directory trees, too. Although it may not work with some remote systems, you can try ``get -R'' with a directory to download the directory and its contents.
When using the ``-R'' flag, you can also use the ``-T'' flag to disable automatic on-the-fly TAR mode for downloading whole directory trees. The program uses TAR whenever possible since this usually preserves symbolic links and file permissions. TAR mode can also result in faster transfers for directories containing many small files, since a single data connection can be used rather than an FTP data connection for each small file. The downside to using TAR is that it forces downloading of the whole directory, even if you had previously downloaded a portion of it earlier, so you may want to use this option if you want to resume downloading of a directory.
Also:
ls
Prints a directory listing from the remote system. It tries to behave like UNIX's ``/bin/ls -CF'' command. If the remote server seems to be a UNIX host, you can also use the same flags you would with ls, for instance
ls -rt
would try to act like
/bin/ls -CFrt
would on UNIX.
ncftp has a powerful built-in system for dealing with directory listings. It tries to cache each one, so if you list the same directory, odds are it will display instantly. Behind the scenes, ncftp always tries a long listing, and then reformats it as it needs to. So even if your first listing of a directory was a regular ``ls'' which displayed the files in columns, your next listing could be ``ls -lrt'' and ncftp would still use the cached directory listing to quickly display the information for you!