- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ftp checking
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
тАО07-09-2008 10:29 PM
тАО07-09-2008 10:29 PM
ftp checking
- Tags:
- ftp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 11:01 PM
тАО07-09-2008 11:01 PM
Re: ftp checking
You can have checksum tally for both files. Get cheksum value of source file and match it with chksum of trasferred file. If both matches then ftp is sucessful. check manpage for more details
#man cksum
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 11:06 PM
тАО07-09-2008 11:06 PM
Re: ftp checking
Check the following example:
#!/usr/bin/sh
ftp -n -v rac1 <>/var/ftpmsg
user root root123
cd /swift
delete $D
bye
!
Here /var/ftpmsg having the logs.
Thanks and regards,
Davis Paul.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-09-2008 11:58 PM
тАО07-09-2008 11:58 PM
Re: ftp checking
I do not have password in remote server ( the remote server is hosted by other company ) , what can i do ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 12:15 AM
тАО07-10-2008 12:15 AM
Re: ftp checking
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 06:18 AM
тАО07-10-2008 06:18 AM
Re: ftp checking
If you want to verify your transfer, and you want to use FTP, enable verbose logging ('-v') and parse the session's messages for a successful transfer. Beware that the content of the message may vary depending on the FTP used on the target server.
Better than that, use Perl's Net::FTP module. This makes error checking simple.
Yet another (better) alternative is to use SFTP. You can do this in a shell; let the SFTP fail on error; and use its return code ($?) to assess the success or failure of the operation.
Testing the source and destination file's checksum is fine *IF* your transfer is a binary one or for ASCII transfers, the end-of-line controls don't change. Hence, a Unix/Windows ASCII transfer is doomed to have its checksums mismatch.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 06:45 AM
тАО07-10-2008 06:45 AM
Re: ftp checking
#!/usr/bin/sh
ftp -n -v rac1 <>/var/ftpmsg
user root root123
cd /swift
delete $D
bye
!
it seems log the connection , what I would like is what files has been transfered and re-transfer if it was unsuccessful , could advise what can i do ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 06:59 AM
тАО07-10-2008 06:59 AM
Re: ftp checking
If you want to verify your transfer, and you want to use FTP, enable verbose logging ('-v') and parse the session's messages for a successful transfer. Beware that the content of the message may vary depending on the FTP used on the target server.
Better than that, use Perl's Net::FTP module. This makes error checking simple.
Yet another (better) alternative is to use SFTP. You can do this in a shell; let the SFTP fail on error; and use its return code ($?) to assess the success or failure of the operation.
Testing the source and destination file's checksum is fine *IF* your transfer is a binary one or for ASCII transfers, the end-of-line controls don't change. Hence, a Unix/Windows ASCII transfer is doomed to have its checksums mismatch.
-------------------------------
I think this is good suggestions , but I am not too familiar with script writing , it may have difficult for me , except use ftp , can advise what is another way to transfer file that I can make sure the files has been successfuly transfered ? if need , I can ask the administrator to login ID to do checksum .
thx advise .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-10-2008 11:41 PM
тАО07-10-2008 11:41 PM
Re: ftp checking
as already suggested you can check teh retrun code or error message redirecting the output (stderr and stin) in afile and check it.
BTW the best way to be sure about the copy of teh file is (after the put) to get back the file copied with another name and perform a cksum or cmp or diff of the files.
In this way you are sure that teh file has been correctly copied.
Just my .02$
HTH,
Art
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-11-2008 01:17 AM
тАО07-11-2008 01:17 AM
Re: ftp checking
This probably works best when using "bin" to copy the files. Or both HP-UX.