Sponsored Content
Full Discussion: detecting corrupted file
Top Forums Shell Programming and Scripting detecting corrupted file Post 40889 by google on Wednesday 24th of September 2003 05:52:15 PM
Old 09-24-2003
Hmm, what would you define as a corrupted file? How would you know if something is corrupt? Since everything in Unix is just a file, I dont think you can say that one file is corrupt vs another file without evaluating its attributes. If its a binary, then running it would tell you that its corrupt when it fails. Capture the return code after its execution. Anything non-zero would imply an issue.
Can you clarify what you mean?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

corrupted tar file

Hi all, I've got a corrupted tar file with some filename being like ?a=n is it possible to get them repaired? (1 Reply)
Discussion started by: klintsovi
1 Replies

2. HP-UX

passwd file corrupted

Good Day Our HP box was hacked and the passwd file has been altered,there are only 2 user accounts active,and these dont have any administrative rights.I need to edit the passwd file to correct the su and root entries. Does any body have any suggestions as to how i can do this with out the root... (10 Replies)
Discussion started by: cantona7
10 Replies

3. UNIX for Dummies Questions & Answers

Help! passwd file corrupted

Hi, I am new to UNIX, and have recently installed Suse 9.3. I have been experimenting with all of the commands and have somehow managed to modify the default shell of the root user to an invalid file. Consequently I cannot su to the root user as I receive the 'no such file or directory' error... (2 Replies)
Discussion started by: Tony Montana
2 Replies

4. HP-UX

Could be a corrupted file?

Hello! Do you know the meaning of... "crw-rw---- 1 informix informix 64 0x020001 Jan 21 2004 rifxroot" I don't know what the first "c" means. Furthermor, if I try to copy this file (rifxroot) it appears a message: "cp: cannot open rifxroot: No such device or address" I don't... (1 Reply)
Discussion started by: kaugrs
1 Replies

5. UNIX for Dummies Questions & Answers

may a corrupted .gz file be repaired?

Preparing for a move to a new server, I needed to offload about somewhat over a gigabyte of newsfeeds that my website collects, and that I had been saving on the server. I tarred them and zipped them into about a dozen smaller files of about 150Mb each. All seemed well. I downloaded them onto my... (3 Replies)
Discussion started by: JohnTinker
3 Replies

6. Solaris

root mail file corrupted

Hi, We were facing cron job failures and raised a case to our UNIX team, they fixed the issue and said cron job failures due to root mail file corruption. My questions are, 1. Whether root mail file corruption cause cron job failures? 2. Do we have any size limitation for root mail file?... (0 Replies)
Discussion started by: paventhan
0 Replies

7. Solaris

WTMPX File corrupted

Hi All I work on solaris 8, 9 and 10 platforms and have encountered an error which is my wtmpx files appear to be corrupted as all entries contain the date 1970 (the birth of unix). Now this is obviously not the case, so my query is: 1 - Can the existing wtmpx files be manipulated to... (6 Replies)
Discussion started by: drestarr96
6 Replies

8. Linux

Corrupted daemon.log file

hi, yesterday I made something wrong and deleted daemon.log file. Then created a new file with the same name under the same path but now, it seems that file constructed has been corrupted . In earlier times, it was including regex name. Now there is no regex name. This is the current... (0 Replies)
Discussion started by: baris35
0 Replies

9. Red Hat

.bash_profile file corrupted

Hi, Unexpectedly i entered wrong entries in .bash_profile for my user which has administrative permissions. So, i am getting errors for every command. I dont have backup file also, so any body can help me how to recover it. Regards, Mastan (7 Replies)
Discussion started by: mastansaheb
7 Replies

10. UNIX for Dummies Questions & Answers

After Ftp'ing file to destination how to check the file if it is in correct ASCII and not corrupted

Hi Folks, While transferring file from FTP software like Filezilla the files gets corrupted. Is there any way I can check if the recently transferred file is in ASCII and not corrupted. I have tried using file -i filename command which does tell if the file character set is ASCII or binary... (6 Replies)
Discussion started by: Khan28
6 Replies
libcrash(5)							File Formats Manual						       libcrash(5)

NAME
libcrash - crash dump access library SYNOPSIS
DESCRIPTION
is a library which provides access to system crash dumps. Access to a dump through the library is independent of the format of the crash dump (there are several, described below). It is also independent of the location of the dump, which could be on a raw dump device, in files in a file system, or a mixture of the two. The memory of a running system can also be treated as a "dump" through use of the driver. All accesses to a dump through the library begin with a call to The crash dump descriptor returned from this call is a necessary parameter to all of the other calls. They are: Verifies the integrity of a dump by checking the sizes and checksums of all of the files making up the dump. Returns a pointer to a structure containing information about the dump and the machine and kernel that produced it. Prepares a file in the crash dump for use, by uncompressing it (if needed) and validating its size and checksum. This function is used internally by the library for access to the physical memory image, and can be used by callers for access to the kernel and kernel module files. Gives information about whether a particular physical memory page was valid on the machine that dumped, and if so, whether or not that page's contents were included in the dump. Reads pages from the dump. Sets the node number that is used by and to access memory in the node private memory areas. Prints to standard error an error or warning message corresponding to one of the error or warning codes returned by another library call. Terminates access to the crash dump and frees all space allocated by the library. Each of the above calls has its own manual page, describing its usage more fully. Crash Dump Formats There are four current formats of system crash dumps: (Version 0) This format, used up through HP-UX 10.01, consists of a single file containing the physical memory image, with a 1-to-1 cor- respondence between file offset and memory address. Usually there is an associated file containing the kernel image. (Version 1) This format, used in HP-UX 10.10, 10.20, and 10.30, consists of a directory containing an file, the kernel file, and numerous files, which contain portions of the physical memory image. (Version 2) This format, used in HP-UX 11.00 and later, consists of a directory containing an file, the kernel and all dynamically loaded kernel module files, and numerous files, each of which contain portions of the physical memory image and metadata describing which memory pages were dumped and which were not. (Version 5) This format is used in HP-UX Release 11i Version 1.0 and later. It is very similar in structure to the format in that it consists of a directory containing an file, the kernel and all dynamically loaded kernel module files, and numerous files, each of which contain portions of the physical memory image and metadata describing which memory pages were dumped and which were not. In addition to the primary file, there are auxiliary index files, that contain metadata describing the image files containing the memory pages. This format will be used when the dump devices have compressed memory images. See crash- conf(1M). Other formats, for example tape archival formats, may be added in the future. Cache Caching mechanism is implemented to improve the performance while analyzing format crash dumps. This caching mechanism is used to keep the uncompressed pages so that subsequent requests can be satisfied from the cache. By default, this caching mechanism will be disabled. It can be enabled by setting the environment variable It will create the cached files in the crash dump directory. RETURN VALUE
Most of the calls in return an integer status value. A zero return value indicates success. A positive return value indicates some sort of warning, despite which the requested operation was completed. A negative return value indicates some sort of error, which prevented completion of the requested operation. The values returned by the library are: Success. The expected size or checksum of one or more files in the crash dump was not recorded, so the integrity of the dump cannot be verified. The dump might be corrupt. The checksum of one or more files in the crash dump could not be computed, so it could not be checked against the expected value. The dump might be corrupt. A raw device containing a portion of the crash dump has been swapped on, so the dump is probably corrupt. The size or checksum of one or more files in the crash dump did not match what was expected. The dump is probably corrupt. A read or write request was issued for a memory address that does not exist on the target machine. A write request was issued for a crash dump. Writes are supported only to running systems through the driver. A raw dump device which is supposed to contain part of the dump does not. It may have been overwritten by swap activity or by a more recent dump. A portion of the crash dump still resides on a dump device of the system that dumped, which is not the current system. The specified node number does not exist. A system error occurred. Consult for the specific error. Note that certain values for have specific meanings in the context of the library. They include: A portion of the crash dump could not be uncompressed. The specified pathname for the dump was neither a plain file, nor a directory containing an INDEX file, nor the pseudodriver. Other values of have their traditional meanings. AUTHOR
was developed by HP. SEE ALSO
cr_close(3), cr_info(3), cr_isaddr(3), cr_open(3), cr_perror(3), cr_read(3), cr_set_node(3), cr_uncompress(3), cr_verify(3). libcrash(5)
All times are GMT -4. The time now is 12:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy