What i do, but it might be over kill, is create a .netrc file in the home directory of the user that will be FTPing. The permissions set to 700. In the file I add the following.
machine [server] login [user] password [password]
The idea of the .netrc file is to allow FTPing without having to enter a user name and password.
So in your script you would put something similar...
example:
Hope that helps!
Hi,
I have been using ftp to transfer files back and forth between windows and unix machines. But everytime i started the ftp session from the windows machine.
I have a question why I am not able to connect to the same windows machine from the same unix machine.
How do I do this?
... (11 Replies)
Hi
I can transfer a single file and multiple file from unix to widows using get and mget command.But i dont know How to transfer a whole directory from unix to windows using command.
pls help me
Ramkumar (1 Reply)
How to do ftp from unix to windows
i have some files in a dir in unix box and i want to put those files in windows through FTP. How to do this ? (9 Replies)
i need to ftp a file from windows to a unix machine by executing a sript(perl/shell/php) from that unix machine.i can also use HTML and javascript to build forms. (3 Replies)
will this work, knowing that the file is in a directory in windows.. It is
going from a drirectory in windoxs to UNIX \
# Error Handling Function
function ErrorHandle
{
# if type is 1, then the file does not exist or unreadable
if
then
echo "File... (5 Replies)
Hi Friends,
I have this script for ftping files from AIX server to local windows xp.
#!/bin/sh
HOST='localsystem.net'
USER='myid_onlocal'
PASSWD='mypwd_onlocal'
FILE='file.txt' ##This is a file on server(AIX)
ftp -n $HOST <<END_SCRIPT
quote USER $USER
quote PASS $PASSWD
put $FILE... (1 Reply)
Hi, I am new to this subject.....Can someone please help me out with the script...
unix usernm "sdhftst"
unix pwd "chsd13"
windows usernm "dfghtst"
windows pwd "chsd13"
path..../xxx/xxxxx/xxxxxx/xxxxxxx
please can u get me a script...its only one file to get ftp.
Thanks... (2 Replies)
Hi,
Is it possible to ftp a huge zip file from windows to unix server using unix shell scripting?
If so what command i need to use.
thanks in advance. (1 Reply)
Discussion started by: Shri123
1 Replies
LEARN ABOUT MINIX
netrc
NETRC(5) BSD File Formats Manual NETRC(5)NAME
netrc -- user configuration for ftp
SYNOPSIS
~/.netrc
DESCRIPTION
This file contains configuration and autologin information for the File Transfer Protocol client ftp(1).
The .netrc file contains login and initialization information used by the auto-login process. It resides in the user's home directory. The
following tokens are recognized; they may be separated by spaces, tabs, or new-lines:
machine name
Identify a remote machine name. The auto-login process searches the .netrc file for a machine token that matches the remote
machine specified on the ftp command line or as an open command argument. Once a match is made, the subsequent .netrc tokens are
processed, stopping when the end of file is reached or another machine or a default token is encountered.
default This is the same as machine name except that default matches any name. There can be only one default token, and it must be after
all machine tokens. This is normally used as:
default login anonymous password user@site
thereby giving the user automatic anonymous ftp login to machines not specified in .netrc. This can be overridden by using the -n
flag to disable auto-login.
login name
Identify a user on the remote machine. If this token is present, the auto-login process will initiate a login using the specified
name.
password string
Supply a password. If this token is present, the auto-login process will supply the specified string if the remote server requires
a password as part of the login process. Note that if this token is present in the .netrc file for any user other than anonymous,
ftp will abort the auto-login process if the .netrc is readable by anyone besides the user.
account string
Supply an additional account password. If this token is present, the auto-login process will supply the specified string if the
remote server requires an additional account password, or the auto-login process will initiate an ACCT command if it does not.
macdef name
Define a macro. This token functions like the ftp macdef command functions. A macro is defined with the specified name; its con-
tents begin with the next .netrc line and continue until a null line (consecutive new-line characters) is encountered. If a macro
named init is defined, it is automatically executed as the last step in the auto-login process.
SEE ALSO ftp(1), ftpd(8)Linux NetKit (0.17) September 23, 1997 Linux NetKit (0.17)