FTP file (Need help - urgent )


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users FTP file (Need help - urgent )
# 1  
Old 02-08-2008
FTP file (Need help - urgent )

i am trying to login to FTP site and move the files. when i run the script on my local machine it completes the task in seconds but when it is run by the actual server it take 10 min to login to FTP... can anybody advice as to what might be the issue ???
i am trying to print current time in the expect.exp script which has command to login to FTP - no luck ... can anybody please advice how to do that ?
# 2  
Old 02-08-2008
Is it seriously to just login and out from the server? Not performing any commands?

Sounds like some sort of DNS related issue, perhaps rather than attempting to ftp to the same machine you do from home, you could try localhost or 127.0.0.1.

After that I would look to Passive FTP issues.

Tough stuff to debug remotely without any logging. This is the basis of a simple perl script that would produce debugging to STDERR that could help debug ftp issues.

Code:
    use Net::FTP;

   my $ftp = Net::FTP->new("localhost", Debug => 1, Passive=>1)
      or die "Cannot connect to some.host.name: $@";

    $ftp->login("user","pass")
      or die "Cannot login ", $ftp->message;

    $ftp->cwd("/")
      or die "Cannot change working directory ", $ftp->message;

    $ftp->list()
      or die "list failed ", $ftp->message;

    $ftp->quit;

# 3  
Old 02-08-2008
it is performing a set of commands...

how can i display time within Expect script.. i tried date, time, timestamp.. nothing worked
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

URGENT Reading a file and assessing the syntax shell script URGENT

I am trying to write a shell script which takes an input file as an arguement in the terminal e.g. bash shellscriptname.sh input.txt. I would like for the file to be read line by line each time checking if the .txt file contains certain words or letters(validating the syntax). If the line being... (1 Reply)
Discussion started by: Gurdza32
1 Replies

2. UNIX for Advanced & Expert Users

Script should flow after ftp --Urgent

Hi everyone, The script actually does the ftp and gets the file to the local system. I want to do some manipulations for that file , But after doing ftp , script is not proceding and just a prompt is displayed . .... ftp code here...... .................... ............... echo "FTP... (4 Replies)
Discussion started by: kaaakrishna
4 Replies

3. Shell Programming and Scripting

ftp from unix to windows - urgent help required

I'm trying to ftp from a Unix machine to a Windows machine.. I've tried the following #!/bin/sh #set -x USER="user1" PASS="pass1" HOSTNAME="host1" ftp -n -i -v $HOSTNAME << EOT user $USER $PASS cd / send text1.txt close bye EOT When I try to run this, I get prompted for the... (1 Reply)
Discussion started by: sam_sal_manu
1 Replies

4. Solaris

Urgent...FTP unable finish download file, hang half way

Hi all, I have 1 problem in my solaris 8 server. The problem is in every nite that will run a cron job to download file from external ftb server. This crob job starter running find, but after running for 4 minute, that ftp services is hang that, until we need kill this process. My question... (3 Replies)
Discussion started by: foongkt5220
3 Replies

5. Shell Programming and Scripting

ftp and telnet in the same script ?? Urgent Help !!

Hi All, I have written a script which ftp certain file to other machine and as the ftp completes , I want to connect to that machine ( at which the file is ftped) . Now the problem is that my script ftp's the file but it does not telnet to that machine. Suppose I am at machine1 and I want to... (11 Replies)
Discussion started by: aarora_98
11 Replies

6. HP-UX

URGENT: UNIX FTP cannot find path error

Dear all We are currently working on to install some ERP system in wjhich we need to FTP from unix to windows 2000 machine We run ./lodrun to get files from d/xxxxx/xxxx directory but the ftpoutput.log file shows following error FTP: xxxxxxxxx system cannot find the path specified... (1 Reply)
Discussion started by: minix
1 Replies

7. UNIX for Advanced & Expert Users

FTP script urgent

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

8. Filesystems, Disks and Memory

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

9. UNIX Desktop Questions & Answers

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies

10. UNIX for Dummies Questions & Answers

Urgent FTP script automation

Hi guys, Here is my requirement for ftp script that i have to automate in unix using shell script: 1) Find the files that atre created one week from the present day. 2) ftp them to the backup server. 3) At the end of the month make a new directory on my backup server with the new month(eg:Once... (1 Reply)
Discussion started by: koduri0475
1 Replies
Login or Register to Ask a Question