Sponsored Content
Top Forums UNIX for Dummies Questions & Answers questions on ftp shell scripting Post 4152 by psyjoniz on Thursday 19th of July 2001 01:23:27 PM
Old 07-19-2001
n/p

ya know, i'm honestly suprised i couldn't find a single example of an ftp shell script on the internet - i actually ended up digging it out of my archives. you would think that with so many people asking about it that there would've been one. gotta start somewhere i guess.
 

10 More Discussions You Might Find Interesting

1. Answers to Frequently Asked Questions

Automate FTP / Scripting FTP Transfers

One of our most frequent questions is how to automate ftp transfers. There are several approaches. Since I'm writing this post, we will start with my favorite technique. :) In Automated FTP task I present a simple example of my ksh co-process technique. And note that later in this thread I... (0 Replies)
Discussion started by: Perderabo
0 Replies

2. Shell Programming and Scripting

few small scripting questions

hello everyone, i have a couple of questions about programming with shell scripts. -My question is, how do you find out how long a sequence of numbers that has just been entered is. for example If i enter 12345 the length here is 5 and 23456789 the length here is eight. I want to be able... (1 Reply)
Discussion started by: bebop1111116
1 Replies

3. Shell Programming and Scripting

Shell/commands/scripting/c questions

1. Can anyone explain me what the line x=signal(SIGINT,nh); does? 2. How do I write a command to print the longest line in a file? 3. How do I write a command to print the last word of every line of a file using sed? 4. What exactly does this line do? :%s/^\(\)\(\)/\2\1/g^M... (3 Replies)
Discussion started by: Necrologist
3 Replies

4. Shell Programming and Scripting

Shell scripting - FTP

Can some one help with script to track ftp logins on AIX server.. (1 Reply)
Discussion started by: ddk2oo5
1 Replies

5. Shell Programming and Scripting

FTP-Shell scripting

Hi Everybody, I have come across a problem while doing FTP using shell scripting. So I request any of you can give some idea of how to go about solving the problem but i request you not to give the solution please. Because i'm a java developer newly into Unix shell progrmming and am very enthu... (1 Reply)
Discussion started by: RSC1985
1 Replies

6. Shell Programming and Scripting

Shell scripting questions

I have a file like this. Pls help me to solve this. 08-24-2010 10:22:34,xxxxxxxxMessage : 111 08-24-2010 10:24:38,xxxxxxxbMessage : 000 08-24-2010 11:28:11,xxxxxxxcMessage : 111 08-24-2010 11:32:35,xxxxxxxdMessage : 111 08-24-2010 11:32:35,xxxxxxxeMessage : 111 (I should look for Message... (1 Reply)
Discussion started by: mnjx
1 Replies

7. Homework & Coursework Questions

Scripting questions

I have two scripts and wish to finish the labs in two days, I am not sure how to make these work though. Any help would be appreciated, a step by step guide would be great! Q1) Complete the following instructions and submit the questions and answers from this lab to your tutor. Please... (1 Reply)
Discussion started by: noobie123
1 Replies

8. Shell Programming and Scripting

Shell Scripting for creating ftp and transfer file

Dear All, We run backup script to update backup file every hour. I want to create a script, which transfer these files in another server using ftp as new backup file created every hour. Files should be stored with a unique name for every hour(e.g 20130708_13:00 , 20130708_14:00 and so on) and... (13 Replies)
Discussion started by: Preeti Saini
13 Replies

9. Shell Programming and Scripting

Shell scripting errors for ftp process

Hi i am facing problem in shell scripting for ftp process getting following errors here is the script & result vi GtpTxnlogs_ftp.sh "GtpTxnlogs_ftp.sh" 40 lines, 921 characters #!/usr/bin/bash ###################################################################################### #... (4 Replies)
Discussion started by: Sarmistha
4 Replies

10. Shell Programming and Scripting

FTP a file using Shell Scripting (Help needed)

the requirements is to have a linux script which connects to a windows machine using ftp command and check for a flag file if found copy a .csv file into current machine. (3 Replies)
Discussion started by: tradingspecial
3 Replies
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)
All times are GMT -4. The time now is 01:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy