Your Ad Here

Jumat, 16 September 2005

Unix Tip: FTP AUTOMATED TRANSFERS

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

UNIX GURU UNIVERSE
UNIX HOT TIP

Unix Tip 2450 - September 16, 2005

http://www.ugu.com/sui/ugu/show?tip.today

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

FTP AUTOMATED TRANSFERS

To add to the earlier tip on automated transfer using FTP, you can define a macro by name 'init' which will automate the whole transfer.

Defining the macro.

In the .netrc file after the definition for the machine name,add the following definition.

macdef init
bin
hash
cd <directory>
!cd <directory>
put/get <filename>
bye

The line begining with macdef starts the definition of a macro.All the sub sequent lines upto a blank line (or end of file) are part of the macro.

Now if you type ftp <machine name> at the prompt, the whole ftp will happen automatically.

These macros can also be defined in any other name in which case,you will have to type the macro name at the ftp prompt for its statements to get executed.


This tip generously supported by: subha@hitechclub.com


--------------------------------------------------------------------------
To Subscribe: http://www.ugu.com/sui/ugu/show?tip.subscribe
To Unsubscribe: http://www.ugu.com/sui/ugu/show?tip.unsubscribe
To Submit A Tip: http://www.ugu.com/sui/ugu/show?tip.today

==========================================================================
DISCLAIMER: All UNIX HOT TIPS ARE OWNED BY THE UNIX GURU UNIVERSE AND ARE
NOT TO BE SOLD, PRINTED OR USED WITHOUT THE WRITTEN CONSENT OF THE UNIX
GURU UNIVERSE. ALL TIPS ARE "USE AT YOUR OWN RISK". UGU ADVISES THAT
ALL TIPS BE TESTED IN A NON-PRODUCTION DEVELOPMENT ENVIRONMENT FIRST.

Unix Guru Universe - www.ugu.com - tips@ugu.com - Copyright 1994-2001
==========================================================================

Tidak ada komentar:

Posting Komentar

Your Ad Here
Free Automatic Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink Free Auto Backlink