O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

25.4. Automating ftp transfers

One popular use of here documents is to automate ftp transfers. When using ftp, it’s nice to give the users a simple interface to work with. The following script uses the username anonymous to make an ftp connection. This is a special username that enables systems to create security-based ftp accounts that hold public directories. Generally speaking, everybody who connects with an anonymous username can only download files from that public directory, but it can be set to upload files.

The password can be anything, but it’s considered good practice to use your hostname and your local userid or e-mail address.

The script that is presented here prompts for the following information:

  1. Remote machine you wish to connect ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required