MacFTPTools for Mac OS X
This tool allows simple mirroring of data from remote FTP servers.
A file will be downloaded only if it is more recent than the one present locally or if it's size is different.
The primary usage of fget is to get a snapshot of your FTP site. In this example, the user "user_name" has an account with password "user_password" on the ftp server "ftp.domain.net".
In order to get an snapshot of your FTP site in a local folder named "ftp.domain.net" on your Desktop, type :
$ cd ~/Desktop/ $ /usr/local/bin/fget -H user_name:user_password@ftp.domain.net |
The option -v ("verbose") enable you to get more feedback during the synchronization.
Since in this tutorial, we have already synchronized the FTP site, fget will detect this event. This allows to proceede faster and limit the amount of data transfered.
$ cd ~/Desktop/ $ /usr/local/bin/fget -v -H user_name:user_password@ftp.domain.net fget: connecting to FTP server ftp.domain.net... fget: logging in as user user_name fget: directory already exists: ./ftp.domain.net/folder1 fget: checking /folder1... fget: not updating file ./ftp.domain.net/folder1/file1 fget: not updating file ./ftp.domain.net/folder1/file2 fget: directory already exists: ./ftp.domain.net/folder2 fget: checking /folder2... fget: not updating file ./ftp.domain.net/folder2/file3 fget: not updating file ./ftp.domain.net/folder2/file4 fget: disconnecting |
The option -e ("estimate") enable you to check the size needed on you local hard disk to mirror your FTP site.
$ /usr/local/bin/fget -e user_name:user_password@ftp.domain.net fget: connecting to FTP server ftp.domain.net... fget: logging in as user user_name 10 /folder1 20 /folder2 30 / fget: total is 30 Kbytes fget: disconnecting |
Another usage of fget is to list the content of one folder on your FTP site. For example, to get the content of the root folder of the site "ftp.domain.net", type :
$ /usr/local/bin/fget -l user_name:user_password@ftp.domain.net |
To get the content of the folder "folder1" of the site "ftp.domain.net", type :
$ /usr/local/bin/fget -l user_name:user_password@ftp.domain.net/folder1 |
$ /usr/local/bin/fget -v Options: [-cdDFHNpPqrRsvV] [-C dir] [-E extendfs_command] [-I urlfile] [-m max_connections] [-t timeout] [-T num_retries] [-i cache_interval] [-M max_cache_size] Usage: fget [options] URL ... fget [options] -l URL ... fget [options] -e URL ... |
More details on the option usage will be soon available
© Philippe Laval, 2003-2006