Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 0b8b09b8b43ffe36f558cee9f0de9cb3 > files > 18

ncftp-3.2.5-2.fc15.i686.rpm

<HTML>
<HEAD>
<TITLE>ncftpget(1) manual page</TITLE>
</HEAD>
<BODY bgcolor=white>

<H2>Name</H2>
<blockquote>
  <b>
ncftpget</b> - Internet file transfer program for scripts
</blockquote>
<H2>Synopsis</H2>
<blockquote>
<P><B>ncftpget</B> [<I>options</I>] <I>remote-host</I> <i>local-directory</i> <i>remote-files...</i></p>
<P><B>ncftpget</B> [<I>options</I>] <I>bookmark-name</I> <i>local-directory</i> <i>remote-files...</i></p>
<P><B>ncftpget</B> <tt>-f</tt> login.cfg [<I>options</I>] <I>local-directory</I>  <i>remote-files...</i></p>
<P><B>ncftpget</B> [<I>options</I>] <I>ftp://url.style.host/path/name</I></p>
<P><B>ncftpget</B> <tt>-c</tt> [<I>options</I>] <I>remote-host</I> <i>remote-file</i><tt> &gt; stdout</tt></p>
<P><B>ncftpget</B> <tt>-C</tt> [<I>options</I>] <I>remote-host</I> <i>remote-file</i> <i>local-path-name</i></p>
<P><B>ncftpget</B> <tt>-c</tt> [<I>options</I>] <I>ftp://url.style.host/path/name</I><tt> &gt; stdout</tt></p>
 
</blockquote>

<center>
<p>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="sales@ncftp.com">
<input type="hidden" name="item_name" value="NcFTP Client">
<input type="hidden" name="item_number" value="NcFTP">
<input type="hidden" name="no_shipping" value="2">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="tax" value="0">
<input type="hidden" name="bn" value="PP-DonationsBF">
<input type="image" src="https://www.paypal.com/en_US/i/btn/x-click-butcc-donate.gif" border="0" name="submit" alt="Make a donation!">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
</center>
 
<H2>Options</H2>
 Command line flags:
<blockquote>
<DL>

<DT><B>-u </B><I>XX</I> </DT>
<DD>Use username <I>XX</I> instead of anonymous.
</DD>

<DT><B>-p </B><I>XX</I> </DT>
<DD>Use password <I>XX</I> with the username. </DD>

<DT><B>-P </B><I>XX</I> </DT>
<DD>Use port number <I>XX</I> instead
of the default FTP service port (21). </DD>

<DT><B>-j </B><I>XX</I> </DT>
<DD>Use account <I>XX</I> in supplement
to the username and password (deprecated). </DD>

<DT><B>-d </B><I>XX</I> </DT>
<DD>Use the file <I>XX</I> for debug
logging. </DD>

<DT><B>-a</B> </DT>
<DD>Use ASCII transfer type instead of binary. </DD>

<DT><B>-t </B><I>XX</I> </DT>
<DD>Timeout after
<I>XX</I> seconds. </DD>

<DT><B>-v</B>/<B>-V</B> </DT>
<DD>Do (do not) use progress meters. The default is to use progress
meters if the output stream is a TTY. </DD>

<DT><B>-f </B><I>XX</I> </DT>
<DD>Read the file <I>XX</I> for host, user,
and password information. </DD>

<DT><B>-c</B> </DT>
<DD>Read from remote host and write locally to standard out.</DD>

<DT><B>-C</B> </DT>
<DD>Read from remote host and write locally to specified pathname.</DD>

<DT><B>-A</B> </DT>
<DD>Append to local files, instead of overwriting
them. </DD>

<DT><B>-z</B>/<B>-Z</B> </DT>
<DD>Do (do not) try to resume transfers. The default is to try to resume
(-z). </DD>

<DT><B>-E</B> </DT>
<DD>Use regular (PORT) data connections. </DD>

<DT><B>-F</B> </DT>
<DD>Use passive (PASV) data connections.&nbsp; The default is to use passive, but to fallback to
  regular if the passive connection fails or times out. </DD>

<DT><B>-DD</B> </DT>
<DD>Delete remote file after successfully
downloading it. </DD>

<DT><B>-R</B> </DT>
<DD>Recursive mode; copy whole directory trees. </DD>

<DT><B>-T</B> </DT>
<DD>Do not use automatic on-the-fly TAR mode for downloading whole directory trees.&nbsp;
  The program uses TAR whenever possible since this usually preserves symbolic links
  and file permissions. TAR mode can also result in faster transfers for directories containing many
  small files, since a single data connection can be used rather than an FTP
  data connection for each small file. The downside to using TAR is that it forces downloading of the whole directory,
  even if you had previously downloaded a portion of it earlier, so you may want to use this option if you want to resume downloading of a directory. </DD>

<DT><B>-r </B><I>XX</I> </DT>
<DD>Redial
a maximum of <I>XX</I> times until connected to the remote FTP server. </DD>

<DT><B>-b</B> </DT>
<DD>Run in
background (by submitting a job to <I>ncftpbatch</I>). </DD>

<DT><B>-bb</B> </DT>
<DD>
Similar to <b>-b</b> option, but only submits the batch
job. You will need to run <i>ncftpbatch</i> for the
batch job to be processed. This is useful if you
already have a <i>ncftpbatch</i> process running, or wish
to have better control of when batch jobs are processed.
<P>
For example, if you wanted to do background processing
of three files all on the same remote
server, it is more polite to use just one <i>ncftpbatch</i>
process to process the three jobs sequentially,
rather than having three <i>ncftpbatch</i> processes open
three simultaneous FTP sessions to the same server.
</DD>

<DT><B>-B </B><I>XX</I> </DT>
<DD>Try setting the TCP/IP
socket buffer size to <I>XX</I> bytes.  </DD>
</DL>

<DT><B>-W </B><I>XX</I> </DT>
<DD>Send raw FTP command <I>XX</I> after logging in.</DD>

<DT><B>-X </B><I>XX</I> </DT>
<DD>Send raw FTP command <I>XX</I> after each file transferred.</DD>

<DT><B>-Y </B><I>XX</I> </DT>
<DD>
Send raw FTP command <I>XX</I> before logging out.
<P>
The <B>-W</B>, <B>-X</B>, and <B>-Y</B> options are useful for advanced
users  who need to tweak behavior on some servers.
For example, users accessing mainframes might need
to  send  some special SITE commands to set blocksize
and record format information.
<P>
For these options, you can use them multiple times
each if you need to send multiple commands.
For the
<B>-X</B> option, you can use the  cookie <TT>%s</TT>  to  expand
into the name of the file that was transferred.
</DD>

<DT><B>-o </B><I>XX</I> </DT>
<DD>Set advanced option <I>XX</I>.
<P>
This option is used primarily for debugging.
It sets the value of an internal variable to an integer value.
An example usage would be:
<tt>-o useFEAT=0,useCLNT=1</tt>
which in this case, disables use of the
FEAT command and enables use of the CLNT command.
The available variables include:
<tt>usePASV</tt>,
<tt>useSIZE</tt>,
<tt>useMDTM</tt>,
<tt>useREST</tt>,
<tt>useNLST_a</tt>,
<tt>useNLST_d</tt>,
<tt>useFEAT</tt>,
<tt>useMLSD</tt>,
<tt>useMLST</tt>,
<tt>useCLNT</tt>,
<tt>useHELP_SITE</tt>,
<tt>useSITE_UTIME</tt>,
<tt>STATfileParamWorks</tt>,
<tt>NLSTfileParamWorks</tt>,
<tt>require20</tt>,
<tt>allowProxyForPORT</tt>,
<tt>doNotGetStartCWD</tt>.
</DD>

</blockquote>

<H2>Description</H2>
 <P>
The purpose of <I>ncftpget</I> is
to do file transfers from the command-line without entering an interactive
shell. This lets you write shell scripts or other unattended processes that
can do FTP. It is also useful for advanced users who want to retrieve files
from the shell command line without entering an interactive FTP program
such as <I>ncftp</I>. <P>
One particularly useful feature of this program is that you
can give it a <I>uniform</I> resource locator as the only argument and the program
will download that file. You can then copy and paste from your web browser
or newsreader and use that URL. Example: <blockquote><pre>$ cd /tmp
$ ncftpget ftp://ftp.ncftp.com/pub/ncftp/ncftp.tar.Z
$ zcat ncftp.tar.Z | tar xf -</pre>
</blockquote>
<P>
By default the program tries to open the remote host and login anonymously,
but you can specify a username and password information. The <B>-u</B> option is
used to specify the username to login as, and the <B>-p</B> option is used to specify
the password. If you are running the program from the shell, you may omit
the <B>-p</B> option and the program will prompt you for the password. <P>
Using the
 <B>-u</B> and <B>-p</B> options are not recommended, because your account information
is exposed to anyone who can see your shell script or your process information.
 For example, someone using the <I>ps</I> program could see your password while
the program runs. <P>
You may use the <B>-f</B> option instead to specify a file with
the account information. However, this is still not secure because anyone
who has read access to the information file can see the account information.
Nevertheless, if you choose to use the <B>-f</B> option the file should look something
like this: <blockquote><pre>host sphygmomanometer.ncftp.com
user gleason
pass mypasswd</pre>
</blockquote>
<p>
Don't forget to change the permissions on this file so no one else can read
them.</p>
 <P>
The <B>-d</B> option is very useful when you are trying to diagnose why a
file transfer is failing. It prints out the entire FTP conversation to the
file you specify, so you can get an idea of what went wrong.   If you specify
the special name <I>stdout</I> as the name of the debugging output file, the output
will instead print to the screen.  Example: <blockquote><pre>$ ncftpget -d stdout bowser.nintendo.co.jp . /pub/ncftp/README
220: FTP server ready.
Connected to bowser.nintendo.co.jp.
Cmd: USER anonymous
331: Guest login ok, send your complete e-mail address as password.
Cmd: PASS xxxxxxxx
230: Welcome!
Logged in to bowser.nintendo.co.jp as anonymous.
Cmd: TYPE I
200: Type set to I.
Cmd: PORT 192,168,9,37,6,76
200: PORT command successful.
Cmd: RETR /pub/README
550: /pub/README: File in use.
Cmd: QUIT
221: Goodbye.</pre>
</blockquote>
<P>
Using ASCII mode is helpful when the text format of your host differs from
that of the remote host. For example, if you are retrieving a .TXT file from
a Windows-based host to a UNIX system, you could use the <B>-a</B> flag which would
use ASCII transfer mode so that the file created on the UNIX system would
be in the UNIX text format instead of the MS-DOS text format. <P>
You can retrieve
an entire directory tree of files by using the <B>-R</B> flag. However, this will
work only if the remote FTP server is a UNIX server, or emulates UNIX's
list output. Example: <blockquote><pre>$ ncftpget -R ftp.ncftp.com /tmp /pub/ncftp</pre>
</blockquote>
<p>This would create a /tmp/ncftp hierarchy.</p>
<H2>Diagnostics</H2>
<blockquote>
 <P>
<I>ncftpget</I> returns
the following exit values: 
<OL start="0">
<LI>Success. </LI><LI>Could not connect to remote host. </LI><LI>Could
not connect to remote host - timed out. </LI><LI>Transfer failed. </LI><LI>Transfer failed -
timed out. </LI><LI>Directory change failed. </LI><LI>Directory change failed - timed out. </LI><LI>Malformed
URL. </LI><LI>Usage error. </LI><LI>Error in login configuration file. </LI><LI>Library initialization
failed. </LI><LI>Session initialization failed.  </LI>
</OL>

</blockquote>

<H2>Author</H2>
<blockquote>
 <P>
Mike Gleason, <a href="http://www.ncftp.com">NcFTP Software</a>.
</blockquote>
<H2>See Also</H2>
<blockquote>
 <P>
<I>ncftpput(1)</I>, <I>ncftpget(1),</I>
<I>ncftp(1)</I>, <I>ftp(1)</I>, <I>rcp(1)</I>, <I>tftp(1)</I>. <P>
<I>LibNcFTP</I>  (<a href="http://www.ncftp.com/libncftp/">http://www.ncftp.com/libncftp/</a>).
</blockquote>
</BODY></HTML>