- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- FTP Error trapping
Operating System - HP-UX
1753750
Members
5203
Online
108799
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2005 02:46 AM
тАО06-28-2005 02:46 AM
FTP Error trapping
I would like to trap all FTP error messages particularly when the network drops i.e. files are not transferred their entirety.
filedir=/informatica/7.1/fileshare/SrcFiles
ftpLogDir=/informatica/7.1/fileshare/Scripts/ftplogs
/usr/bin/ftp -n -v $HOST <&1 ${ftpLogDir}/ftp.log
quote user $USER
quote pass $PASSWD
ascii
cd $DIR
prompt
get $FILE ${filedir}/$FILE
bye
EOA
Is there a better way of trapping errors besides scanning the log files for error codes
?
filedir=/informatica/7.1/fileshare/SrcFiles
ftpLogDir=/informatica/7.1/fileshare/Scripts/ftplogs
/usr/bin/ftp -n -v $HOST <
quote user $USER
quote pass $PASSWD
ascii
cd $DIR
prompt
get $FILE ${filedir}/$FILE
bye
EOA
Is there a better way of trapping errors besides scanning the log files for error codes
?
- Tags:
- ftp
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2005 03:07 AM
тАО06-28-2005 03:07 AM
Re: FTP Error trapping
Humphrey,
you could look at using the PERL::FTP module.
Also look at the man ftpd for a better breakdown of the ftp error codes.
Quick way to check successful transfer would be checksum the file before sending and then compare against checksum with rsh.
Regards
you could look at using the PERL::FTP module.
Also look at the man ftpd for a better breakdown of the ftp error codes.
Quick way to check successful transfer would be checksum the file before sending and then compare against checksum with rsh.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2005 03:49 AM
тАО06-28-2005 03:49 AM
Re: FTP Error trapping
By far, the easiest method is Perl's Net::FTP module. You get error checking for free. The attached script will make it very easy for you and will return a meaning error code to the shell. If 0 status is returned, all is well. You can specify the login, password, optional account, directory, binary or ASCII, and the file(s) on the command line and all you need to do is look at the status.
It will also use .netrc if available so that the password does not have to be specified.
It will also use .netrc if available so that the password does not have to be specified.
If it ain't broke, I can fix that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-28-2005 03:50 AM
тАО06-28-2005 03:50 AM
Re: FTP Error trapping
Ooops, I should have added invoke as ftpget.pl -u for full usage. This script will even work on Windows if one the the freely available Perls is installed.
If it ain't broke, I can fix that.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP