- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- corrupted files
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
тАО08-04-2006 01:37 AM
тАО08-04-2006 01:37 AM
We want to know which files are corrupted and which are not. Is there a way to determine which files have zero's after 5 KB ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2006 01:45 AM
тАО08-04-2006 01:45 AM
SolutionBy what determination do you conclude that the file is corrupted?
This sounds like a "sparse" file to me. Sparse files are common in databases,
A sparse file can easily be created by opening a file; seeking to some offset; writing some data; and closing the file.
Using tools like 'cpio' or 'cp' to copy a sparse file will expand it. That is, the empty regions will be populated with zeros.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2006 01:51 AM
тАО08-04-2006 01:51 AM
Re: corrupted files
File may have been created via prealloc. See man prealloc
Creates files filled with null.
What are the symptoms that lead you to assume the files are corrupted? Any clue in the filename as to what they may be?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-04-2006 04:15 AM
тАО08-04-2006 04:15 AM
Re: corrupted files
I really doubt, that the method you trying to use to find such files will make much sense.
But if you want to try:
dd if=$yourfile of=/tmp/tstout bs=5k skip=1
if [ -s /tmp/tstout ]
then
tr -d '\0' /tmp/tststrip
if [ -s /tmp/tststrip ]
then print $yourfile is NULLfilled
fi
fi
mfG Peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 09:37 PM
тАО08-07-2006 09:37 PM
Re: corrupted files
can you please update this thread or did the forum find you a suitable solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-07-2006 10:22 PM
тАО08-07-2006 10:22 PM
Re: corrupted files
The following command was issued:
cd /import/DNP01 ; tar cf - . | ( cd /appl/samba/shares/unmirr_prod_sts03/data/DNP01/content_storage_01/00015c61 ; tar xf - )
But since the /appl/samba shares/unmirr_prod_sts03 didn't excist , tar emptied it's buffer( 512 k) in the original directory.