LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Password
Red Hat This forum is for the discussion of Red Hat Linux.

Notices


Reply
  Search this Thread
Old 01-15-2004, 04:04 PM   #1
jbhanc0125
LQ Newbie
 
Registered: Jan 2004
Posts: 7

Rep: Reputation: 0
Question Running FTP inside Shell Script truncates files


I am trying to set up a scheduled job on one of my workstations (RH7.3 - fully up2date). The job is to FTP a set of TAR files from several servers as a backup.

I can execute the appropriate FTP commands from the command line and everything works fine.

However, when I execute a shell script to do the same commands (login to the servers via FTP, move to the appropriate directory, and then mget the files), the downloaded files are 24 bytes shorter than the files on the server and unusable.

Has anyone encountered this situation? Any ideas as to what's going on and how to fix it?
 
Old 01-16-2004, 12:16 AM   #2
kasperhans
Member
 
Registered: Oct 2003
Location: right behind the moon
Distribution: gentoo
Posts: 466

Rep: Reputation: 30
fix it by using ncftp as program for your job just rewrite the script and look what happens and maybe you should post your script would be helpfull
 
Old 01-16-2004, 07:52 AM   #3
jbhanc0125
LQ Newbie
 
Registered: Jan 2004
Posts: 7

Original Poster
Rep: Reputation: 0
That worked!!!

I wound up using ncftpget as a single command in my script. It works fine.

Thanks for the hint.
 
Old 01-16-2004, 11:37 AM   #4
aqoliveira
Member
 
Registered: Dec 2001
Location: Portugal
Distribution: /Red Hat/Fedora/Solaris
Posts: 622

Rep: Reputation: 30
Howzit

glad u have been sorted out u may also try wget and lftp see how that works

chow
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem executing mv command inside shell script pablogosse Linux - General 7 12-16-2009 12:21 PM
Shell script inside shell script treotan Linux - General 4 02-19-2009 06:34 AM
changing the user inside a shell script sanjith11 Programming 2 04-22-2004 07:44 AM
Running a program inside my QT application does not produce needed output files??? keos Programming 0 02-22-2004 11:37 PM
Connection, login and upload files to ftp server via shell script Paulo Góes Linux - Networking 2 02-21-2004 01:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Red Hat

All times are GMT -5. The time now is 10:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration