0

I know ftp client(classical ftp client of Unix, for example kftp or netkit-ftp binary) use the file $HOME/.netrc. The syntax is really simple

machine ftpservername login myname password ******* 

But if I want for example to turn on or off the prompt(prompt off command) there is no $HOME/.ftprc? Is possible to put configuration on $HOME/.netrc?

1 Answer 1

0

Solution found. First the only rc file of ftp client is $HOME/.netrc there is not ftprc at least under netkit-ftp. For commands is really simple, we can define and use macros.

cat $HOME/.netrc machine ftp.myserver.priv login anonymous password anonymous macdef macrodef1 prompt off 

The last line must be empty or return error. To run the macro on ftp client we can use $

$macrodef1 

To run the macro

echo "\$ macrodef1" | ftp -v ftp.myserver.priv 

If we want a macro which run automatically we can define a configuration for specific machine, the macro is called "init" and is recognized for autorun by ftp client.

machine yourmachine.com login youruser password yourpass macdef init passive on prompt off 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.