- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Move file
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
Forums
Discussions
Discussions
Discussions
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
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
08-15-2006 05:37 PM
08-15-2006 05:37 PM
Move file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2006 05:55 PM
08-15-2006 05:55 PM
Re: Move file
Regards,
Ninad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2006 06:33 PM
08-15-2006 06:33 PM
Re: Move file
can advise how to use cksum , is it easy to implement ? thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2006 06:43 PM
08-15-2006 06:43 PM
Re: Move file
See "man cksum" for more info.
You may run the command "cksum file" before and after the transfer and compare the results to ensure the file is ok.
You probably can automate this with a script.
Hope this helps!
Regards
Torsten.
__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.
__________________________________________________
No support by private messages. Please ask the forum!
If you feel this was helpful please click the KUDOS! thumb below!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2006 06:48 PM
08-15-2006 06:48 PM
Re: Move file
I know cksum is used for checking the size of the file by byte , that's good but seems too low level . I just want to make sure the file is moved to remote site correctly , eg. if the leased line is broken then stop to move file until the line is resumed etc. thx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2006 09:04 PM
08-15-2006 09:04 PM
Re: Move file
cksum isn't too low level - you need to know if the transmission from A to B was completely and errorfree, so how should a check work without looking hard at the files?
I would tar+gzip the files to send, so the un-tar and gunzip can act as additional error checkers.
My example assumes ssh/scp connection, but can be adopted to other remote commands easily:
#!/usr/bin/sh
tar cf - files and dirs to send | gzip >toremote.tar.gz
cksum toremote.tar.gz >toremote.cksum
if scp toremote.tar.gz hostB:/todir
then :
else
print -u2 ERROR: file transfer failed
exit 1
fi
ssh hostB cksum /todir/toremote.tar.gz >fromremote.cksum
if cmp fromremote.cksum toremote.cksum
then ssh hostB 'cd wherever && gunzip else
print -u2 "ERROR: hostB:/todir/toremote.tar.gz is corrupted"
exit 2
fi
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2006 09:19 PM
08-15-2006 09:19 PM
Re: Move file
You can also use "md5sum".
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2006 01:10 AM
08-16-2006 01:10 AM
Re: Move file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2006 09:50 AM
08-16-2006 09:50 AM
Re: Move file
e.g : sum file.tar > file.tar.sum
after you finish to copy the file you can run sum on the file.tar : sum file.tar
on target and see if it's equal to the file.tar.sum