Needed help in FTP


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Needed help in FTP
# 1  
Old 04-27-2009
Needed help in FTP

i have a requirement in which i need to FTP to a remote dir called "TEST" in remote server "CBOX.COM" from host server "ABOX.COM" .

I need to find zero byte file in that remote dir "TEST" and list it.

How to put this in FTP part in the below script ( to list zero byte file )

Code:
#!/bin/ksh
ftp -v -n CBOX.COM<< "EOF"
user apert pass1
prompt
cd TEST
ls -ltr 
bye
EOF

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Needed script to FTP a File and generate a quality checksum file

hi all i want a script to FTP a file and should generate a quality checksum file means when I FTP a file from one server to another server it should generate a QC file which should contain timestamp,no.of records in that file Thanks in advance saikumar (3 Replies)
Discussion started by: hemanthsaikumar
3 Replies

3. Shell Programming and Scripting

shell script help needed to manage FTP automation

Hi, I am very new in shell scripting. Have managed to prepare a script which will work to download data to local directory. But facing below problem. :wall: Please help me out. Thanks in advance. Problem: 1. I am unable to use delete command to delete data in the ftp location (I have... (2 Replies)
Discussion started by: ImranBD
2 Replies

4. HP-UX

[Solved] Unable to rename file in ftp server .Net:FTP perl

Hello All, I am trying to connect to ftp server and get the files. Also i need to rename the file in other ftp dir. rename method is not allowing me to rename the file in other dir. When i tried copy command by using net::FTP:FILE then perl says it is not installed. Can some body help me to... (2 Replies)
Discussion started by: krsnadasa
2 Replies

5. Shell Programming and Scripting

Help needed to transfer list of files to FTP server, to different folders

Hello Unix Gurus, Help required from you. My requirement is something like this I want to create a concurrenct program in Oracle Applications using shell script to transfer files from Apps Server to destination FTP server. I have created custom program, where I will extract all the... (4 Replies)
Discussion started by: amazon
4 Replies

6. Shell Programming and Scripting

FTP help needed !

i have to FTP some 80 files from server1 to server2. But after FTP all the files in the server2, i dnt want the mtime to be changed. How to keep the same mtime while doing FTP? Below some of the files: -rw-r----- 1 pipe pipe 334420 Jan 3 08:02 L04DETLE.PSV_01032009_080051... (1 Reply)
Discussion started by: ali560045
1 Replies

7. Shell Programming and Scripting

Help needed with automated FTP script

Hi, Ok, i'm trying to automate sending a DB backup from a linux box to a remote Windows PC via FTP. I can connect, send the file and create a folder, however I require that the backups be differentiated by date. Here is what my script looks like: open *.*.*.* user username password lcd... (4 Replies)
Discussion started by: leimrod
4 Replies

8. Shell Programming and Scripting

Script needed to FTP a file from sql report to unix server

Hi All, I have a Sqlplus report which will create a file. I need a FTP Script that will be executed inside the Sqlplus Report to FTP the report output file to unix server. Thanks, Previn (0 Replies)
Discussion started by: vprevin
0 Replies

9. Linux

Better FTP service needed. (suspected inteferance)

Hello there, I have of recent been having overbearing problems with my Linux computer when accessing servers via FTP. The server behaves rather erractically and refuses to complete uploads, merely stalling the transfer for an unpredictable amount of time, which can stem from being either 5... (2 Replies)
Discussion started by: Noran Rad
2 Replies

10. UNIX for Dummies Questions & Answers

hand needed about FTP service on SCO UNIX

Hi all. I'm pretty new to this forum,hope a good time here. issue is that I have a SCO UNIX 5.0.5 installed on the virtual machine VMware. Configured the NIC and assigned 192.168.18.254 as it's IP,and the host OS windows XP 's IP is 192.168.18.8 ,both of them can PING each other... (4 Replies)
Discussion started by: blf0
4 Replies
Login or Register to Ask a Question
FTP_GET(3)								 1								FTP_GET(3)

ftp_get - Downloads a file from the FTP server

SYNOPSIS
bool ftp_get (resource $ftp_stream, string $local_file, string $remote_file, int $mode, [int $resumepos]) DESCRIPTION
ftp_get(3) retrieves a remote file from the FTP server, and saves it into a local file. PARAMETERS
o $ftp_stream - The link identifier of the FTP connection. o $local_file - The local file path (will be overwritten if the file already exists). o $remote_file - The remote file path. o $mode - The transfer mode. Must be either FTP_ASCII or FTP_BINARY. o $resumepos - The position in the remote file to start downloading from. RETURN VALUES
Returns TRUE on success or FALSE on failure. EXAMPLES
Example #1 ftp_get(3) example <?php // define some variables $local_file = 'local.zip'; $server_file = 'server.zip'; // set up basic connection $conn_id = ftp_connect($ftp_server); // login with username and password $login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass); // try to download $server_file and save to $local_file if (ftp_get($conn_id, $local_file, $server_file, FTP_BINARY)) { echo "Successfully written to $local_file "; } else { echo "There was a problem "; } // close the connection ftp_close($conn_id); ?> SEE ALSO
ftp_pasv(3), ftp_fget(3), ftp_nb_get(3), ftp_nb_fget(3). PHP Documentation Group FTP_GET(3)