Sorry for my primitive question, but I have not found it in the FAQs.
Thank you for any answer.
Zoltan Boros
Cannot actually test this, but there should be no problem using
$ nohup ftp -n [host] <scriptfile >ftp.log 2>&1 &.
Do not forget the "-n" option (man ftp).
-------------------------------------------------
Always keep curiousity high to satisfy Your mind
but remember where to go when the main fuse blows
For preference and ease, use ncftp which takes either URLs
(ftp://machine/path/file) or a sort of :/ notation (machine:/path/file) as
command-line arguments and is easily nohup'd, as in
nohup ncftp machine:/path/file >& alloutput &
(in C-shell, anyway, this captures both stderr and stdout into the output
file in case the FTP can't get through).
Alternatively, create a file ~/.netrc with a reference to the machine you're
FTPing to, and nohup the ftp command. I'm attaching `man 5 netrc` here for a
description of the format in case your site doesn't have the manpage.
~Tim
__________ ________________
_______/Tim Haynes\__________________________________/Top...@ed.ac.uk\______
| Graduate CS-type person from Edinburgh http://www.tardis.ed.ac.uk/~tdxh|
| GCS d? p c++++ l= e* m* s--/+ Finger td...@tardis.ed.ac.uk |
| !n h+ f+ !g w+ t--- r- y? or visit webpage for PGP key. |
| "Remember, A Dragon is For Life, |
| Not Just for Hogswatchnight." (Terry Pratchett, Lords and Ladies) |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NETRC(5) FILE FORMATS NETRC(5)
NAME
netrc - file for ftp remote login data
DESCRIPTION
The .netrc file contains data for logging in to a remote
host over the network for file transfers by ftp(1C). This
file resides in the user's home directory on the machine
initiating the file transfer. Its permissions should be set
to disallow read access by group and others (see chmod(1V)).
The following tokens are recognized; they may be separated
by SPACE, TAB, or NEWLINE characters:
machinename
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, stop-
ping when the EOF is reached or another machine token
is encountered.
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: if this token is present in the
.netrc file, 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 addi-
tional account password, or the auto-login process will
initiate an ACCT command if it does not.
macdef name
Define a macro. This token functions as the ftp macdef
command functions. A macro is defined with the speci-
fied name; its contents begin with the next .netrc line
and continue until a null line (consecutive NEWLINE
characters) is encountered. If a macro named init is
defined, it is automatically executed as the last step
in the auto-login process.
Sun Release 4.1 Last change: 19 October 1988 1
NETRC(5) FILE FORMATS NETRC(5)
EXAMPLE
The command:
machine ray login demo password mypassword
allows an autologin to the machine ray using the login name
demo with password mypassword.
FILES
~/.netrc
SEE ALSO
chmod(1V), ftp(1C), ftpd(8C)
Sun Release 4.1 Last change: 19 October 1988 2