09-07-2006
Blowtorch,
Can you please give me a simple example on how to connect to a host and supply user name, password, port and fiile name and to send that file name to that host.
For example in ncftp I would do something like:
$ /hps/ncftpclient/ncftp-3.1.8/bin/ncftpput -u username -p password -P 21 -a 10.1.1.1 /folder1/folder2/filename.pdf
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm completely new to Unix, but familiar with Mac OSX. I've just discovered the command line terminal feature of this new OS and I'm trying to learn how to telnet into my host's server to change permissions to allow executable cgi scripts for my website. Is there anyone who might be able to... (2 Replies)
Discussion started by: tylerl
2 Replies
2. UNIX for Dummies Questions & Answers
Hi!
Does anyone of you know another good ftp command line Client like Midnight Commander? (not /usr/bin/ftp)
Thanks. (5 Replies)
Discussion started by: donald1111
5 Replies
3. UNIX for Dummies Questions & Answers
Hello,
Is there a way to upload a directory via ftp in the command line in a single line? I'd be looking for something like this:
ftp -username me -password 12345 /Users/me/mywebsitefolder /publichtml/
But I can't figure out the proper syntax.
Thank you for any help.
-Grey (1 Reply)
Discussion started by: wellington_grey
1 Replies
4. Shell Programming and Scripting
Hi all,
I need a batch script to Check for existence of file say i check for files with extension xml.done in C:\Myfile.(This folder contains .xml file and its corresponding .done files)
If the .done file exists then it should FTP the corresponding .xml file to UNIX.
Is this possible to do... (6 Replies)
Discussion started by: Codesearcher
6 Replies
5. Shell Programming and Scripting
Dear All,
I am new to unix and I am trying to build a shell script which will connect to a different server by passing username and password from a file or command line but not manually...
In short I dont want to connect to a diff server via ftp interactively.
Any suggestion...looking... (8 Replies)
Discussion started by: Pratik4891
8 Replies
6. Shell Programming and Scripting
i want to write a shell script function that will ftp the files passed in the command line . i have written a shell script for ftp but how will it do for all files passed in command line argument ,
i am passing 4 files as argument
./ftp.sh file1 file2 file3 file4
code written by me... (5 Replies)
Discussion started by: rateeshkumar
5 Replies
7. UNIX for Dummies Questions & Answers
I am using VSFTPD on amazon web services and have a remote service that uploads files to server via FTP. The files comes through fine and when I log in via FTP client I see them. The problem is the files are supposed to be moved once uploaded but the files are not visible via command line thus the... (2 Replies)
Discussion started by: theman0684
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Using command-line utility "ftp or sftp", I want to transfer files across Windows and UNIX.
Can you please tell me from where I need to connect to ftp and how do I specify the hostname, credentials and how do I get and put files between DOS and UNIX?
Please provide me as much... (10 Replies)
Discussion started by: Dev_Dev
10 Replies
9. UNIX for Dummies Questions & Answers
Hi list,
I need a POP3 mail client which I can use from the command line within a bash shell script to download email to a folder location. Can anyone recommend a good POP3 client which can be used from the command line in bash?
Using redhat enterprise linux 5 and 6.
thanks,
Land (2 Replies)
Discussion started by: landossa
2 Replies
LEARN ABOUT REDHAT
ncftpls
ncftpls(1) General Commands Manual ncftpls(1)
NAME
ncftpls - Internet file transfer program for scripts
SYNOPSIS
ncftpls [options] ftp://url.style/host/path/name/
OPTIONS
Command line flags:
-1 Most basic format, one item per line.
-l Long list format.
-R Long list format, recurse subdirectories. Equivalent to "-x -lR".
-x -XX Additional ls flags to pass on to the server.
-u XX Use username XX instead of anonymous.
-p XX Use password XX with the username.
-P XX Use port number XX instead of the default FTP service port (21).
-d XX Use the file XX for debug logging.
-t XX Timeout after XX seconds.
-E Use regular (PORT) data connections.
-F Use passive (PASV) data connections. The default is to use passive, but to fallback to regular if the passive connection fails or
times out.
-r XX Redial a maximum of XX times until connected to the remote FTP server.
-W XX Send raw FTP command XX after logging in.
-X XX Send raw FTP command XX after each file transferred.
-Y XX Send raw FTP command XX before logging out.
The -W, -X, and -Y 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.
For these options, you can use them multiple times each if you need to send multiple commands. For the -X option, you can use the
cookie %s to expand into the name of the file that was transferred.
DESCRIPTION
The purpose of ncftpls is to do remote directory listings using the File Transfer Protocol without entering an interactive shell. This
lets you write shell scripts or other unattended processes that can do FTP.
The default behavior is to print the directory listing in columnized format (i.e. ls -CF), but that is not very useful for scripting. This
example uses the -1 flag, to print one file per line:
$ ncftpls -1 ftp://ftp.ncftp.com/pub/ncftp/
You can also do a remote "ls -l", by using "ncftpls -l". If you want to try other flags, you have to use them with the -x flag. For exam-
ple, if you wanted to do a remote "ls -lrt", you could do this:
$ ncftpls -x "-lrt" ftp://ftp.ncftp.com/pub/ncftp/
By default the program tries to open the remote host and login anonymously, but you can specify a username and password information like
you can with ncftpget or ncftpput.
DIAGNOSTICS
ncftpls returns the following exit values:
0 Success.
1 Could not connect to remote host.
2 Could not connect to remote host - timed out.
3 Transfer failed.
4 Transfer failed - timed out.
5 Directory change failed.
6 Directory change failed - timed out.
7 Malformed URL.
8 Usage error.
9 Error in login configuration file.
10 Library initialization failed.
11 Session initialization failed.
AUTHOR
Mike Gleason, NcFTP Software (mgleason@ncftp.com).
SEE ALSO
ncftpput(1), ncftpget(1), ncftp(1), ftp(1), rcp(1), tftp(1).
LibNcFTP (http://www.ncftp.com/libncftp/).
Software NcFTP ncftpls(1)