LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-13-2003, 01:40 PM   #1
gendreau
LQ Newbie
 
Registered: May 2003
Posts: 24

Rep: Reputation: 15
How to set ascii mode in FTP using .netrc


if I have a .netrc file that looks something like this:

machine fl.address.net
login myname


and I wanted to make it so that when I hit ftp fl.address.net it will open the connection, prompt for my password, and then automatically set the transfer mode to ascii. How can I do this? Maybe I dont need to add it to my .netrc file, I dunno

Thanks for your help !

Last edited by gendreau; 06-13-2003 at 01:43 PM.
 
Old 08-08-2003, 01:05 PM   #2
arobic
Member
 
Registered: Jul 2003
Location: Geneva, Switzerland
Distribution: Debian 3.1, SLC3 (based on RHEL)
Posts: 84

Rep: Reputation: 15
I'm afraid you can't!

They only possibility I see for you is to define a macro in your .netrc file that will first set type to ascii and then transfer the files you want.

To define a macro, type the following in the line just after your "machine...":
macdef <name>
ascii
<commands>

Don't forget to leave a blank line after your macro, it tells ftp where your macro stops.

And if you want your macro to be automatically executed at auto-login, you have to set the macro name to "init". And you can also set your passwd in your .netrc file directly, did you know?

Hope this helps!

Cheers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set binary mode as default in FTP ??? montylee Linux - Newbie 2 03-30-2009 09:05 AM
trouble logging in to ftp with .netrc laclac01 Linux - General 1 10-27-2005 02:15 PM
Passive/Active mode in Konqueror & .netrc perl21 SUSE / openSUSE 0 03-18-2005 09:11 PM
Konqueror FTP passive/active problem & .netrc perl21 Linux - General 0 03-17-2005 05:43 PM
How do I set my FTP server to accept passive FTP? imsam Linux - Newbie 3 12-12-2004 07:22 AM


All times are GMT -5. The time now is 10:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration