HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cpio and integrity data
Operating System - HP-UX
1826583
Members
3816
Online
109695
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
Forums
Discussions
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
07-24-2004 04:55 AM
07-24-2004 04:55 AM
Is there some guarantee of the data integrity with cpio command to copy data from one directory to another?
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2004 05:13 AM
07-24-2004 05:13 AM
Solution
The degree of intergrity is the same as any other copy mechanism (cp, tar, etc). To be sure, you should run cksum on every file in the source and destination. NOTE: The destination space usage will generally *NOT* be the same as the source (tools like ll, du, bdf and df will not match). But that is not important. Only the checksums are important. For an explanation, search the forum for the term sparse files.
Bill Hassell, sysadmin
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2004 05:32 AM
07-24-2004 05:32 AM
Re: Cpio and integrity data
Many thanks for you info.
I have copied a 250 GB file system with many directories and files and I would like to do the cksum for all files.
Do you know how I could do that task without having to go to every directory?
I have copied a 250 GB file system with many directories and files and I would like to do the cksum for all files.
Do you know how I could do that task without having to go to every directory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2004 02:26 PM
07-24-2004 02:26 PM
Re: Cpio and integrity data
You'll have to check every file and compare the results. Well, you won't, let the computer do the work:
find /old-dir -type f -exec cksum {} \;
find /new-dir -type f -exec cksum {} \;
Now that produces a long listing of all the files. To compare them, you'll have to sort both lists and use diff:
find /old-dir -type f -exec cksum {} \; | sorrt -k3 > /var/tmp/oldcksum
find /new-dir -type f -exec cksum {} \; | sort -k3 > /var/tmp/newcksum
diff /var/tmp/oldcksum /var/tmp/newcksum
If there is no output from diff, then the lists are the same. Note that if one or the other filesystems is not a top-level mountpoint then lost+found will not appear. This is perfectly normal.
Bill Hassell, sysadmin
find /old-dir -type f -exec cksum {} \;
find /new-dir -type f -exec cksum {} \;
Now that produces a long listing of all the files. To compare them, you'll have to sort both lists and use diff:
find /old-dir -type f -exec cksum {} \; | sorrt -k3 > /var/tmp/oldcksum
find /new-dir -type f -exec cksum {} \; | sort -k3 > /var/tmp/newcksum
diff /var/tmp/oldcksum /var/tmp/newcksum
If there is no output from diff, then the lists are the same. Note that if one or the other filesystems is not a top-level mountpoint then lost+found will not appear. This is perfectly normal.
Bill Hassell, sysadmin
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.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP