#81 Synchronizing Directories with FTP

One of my most common uses for ftp is to ensure that a local copy of a directory is synchronized with a remote copy on a web server. The fancy name for this is content mirroring. The basic idea is simple: Move into a specific local directory, specify a remote server and remote directory, and then ensure that anything that's changed in one directory is copied to the other, as needed.

This book offers two scripts for FTP syncing: ftpsyncup and ftpsyncdown. The first uploads all files in the current directory to the remote directory, while the latter does the opposite and is presented next, as Script #82. Unless you're starting afresh on a new client system and thus need to acquire the latest versions ...

Get Wicked Cool Shell Scripts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.