Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 06-13-2003, 12:40 PM   #1
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:

login myname

and I wanted to make it so that when I hit ftp 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 12:43 PM.
Old 08-08-2003, 12:05 PM   #2
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>

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!



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 08:05 AM
trouble logging in to ftp with .netrc laclac01 Linux - General 1 10-27-2005 01:15 PM
Passive/Active mode in Konqueror & .netrc perl21 SUSE / openSUSE 0 03-18-2005 08:11 PM
Konqueror FTP passive/active problem & .netrc perl21 Linux - General 0 03-17-2005 04:43 PM
How do I set my FTP server to accept passive FTP? imsam Linux - Newbie 3 12-12-2004 06:22 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:18 AM.

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