FTP prompt

Hello,

I am connectin to a remote server using:

ftp -n -i <server>
user <username> <password>
lcd ~/YAFFA

after i execute lcd command ther is a prompt:

"Local directory now /home/YAFFA"

How can is make it disappear?
:confused:

Check if your ftp client has a switch for being less talkative maybe. Else I guess you'll have to rewrite the ftp client :wink: In an output (log) file you could just do a

grep -v "Local directory now" logfile

Or switch to scp/sftp. scp will be much less talkative and sftp you'll have to test.

1 Like

The short (and probably unsatisfying) answer is: you can't - at least you can't using a standard ftp client. There might be more powerful ftp-clients out there, but using them will make your solution dependant on these and hence less portable.

You could use a different protocol with better clients as zaxxon already mentioned which would have the additional advantage of avoiding the quite unreliable and intrinsically unsecure ftp-protocol. I'd recomment scp because it uses SSL and you don't have to write passwords in plain text to the disk (neither you don't have to use them over the network). What's more it is even easier to use in scripts too.

I hope this helps.

bakunin

1 Like