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
CYRRECONSTRUCT(8)					      System Manager's Manual						 CYRRECONSTRUCT(8)

 *

NAME
cyrreconstruct - reconstruct mailboxes SYNOPSIS
cyrreconstruct [ -C config-file ] [ -p partition ] [ -x ] [ -r ] [ -f ] [ -k ] [ -s ] [ -g ] [ -G ] [ -R ] [ -o ] [ -O ] mailbox... cyrreconstruct [ -C config-file ] -m DESCRIPTION
cyrreconstruct rebuilds one or more IMAP mailboxes. When invoked with the -m switch, it rebuilds the master mailboxes file. It can be used to recover from almost any sort of data corruption. If cyrreconstruct can find existing header and index files, it attempts to preserve any data in them that is not derivable from the message files themselves. The state cyrreconstruct attempts to preserve includes the flag names, flag state, and internaldate. cyrreconstruct derives all other information from the message files. cyrreconstruct reads its configuration options out of the imapd.conf(5) file unless specified otherwise by -C. Any mailbox directory underneath the path specified in the partition-news configuration option is assumed to be in news format. cyrreconstruct does not adjust the quota usage recorded in any quota root files. After running cyrreconstruct, it is advisable to run cyrquota(8) with the -f switch in order to fix the quota root files. OPTIONS
-C config-file Read configuration options from config-file. -p partition Search for the listed (non-existant) mailboxes on the indicated partition. Create the mailboxes in the database in addition to reconstructing them. (not compatible with the use of wildcards) -x When processing a mailbox which is not in the mailbox list (e.g. via the -p or -f options), do not import the metadata from the mailbox, instead create it anew (this specifically affects at least the mailbox's seen state unique identifier, user flags, and ACL). -r Recursively reconstruct all sub-mailboxes of the mailboxes or mailbox prefixes given as arguments. -f Examine the filesystem underneath mailbox, adding all directories with a cyrus.header found there as new mailboxes. Useful for restoring mailboxes from backups. -s Don't stat underlying files. This makes reconstruct run faster, at the expense of not noticing some issues (like zero byte files or size mistmatches). "reconstruct -s" should be quite fast. -n Don't make any changes. This gives equivalent behaviour to chk_cyrus where problems are reported, but not fixed. -G Force re-parsing of the underlying message (checks GUID correctness). Reconstruct with -G should fix all possible individual mes- sage issues, including corrupted data files. -R Perform a UID upgrade operation on GUID mismatch files. Use this option if you think your index is corrupted rather than your mes- sage files, or if all backup attempts have failed and you're happy to be served the missing files. -U Use this option if you have corrupt message files in your spool and have been unable to restore them from backup. This will make the mailbox IOERROR free and fix replication. WARNING this deletes corrupt message files for ever - so make sure you've exhausted other options first! -o Ignore odd files in your mailbox disk directories. Probably useful if you are using some tool which adds additional tracking files. -O Delete odd files. This is the opposite of '-o'. -m NOTE: CURRENTLY UNAVAILABLE Rebuild the mailboxes file. Use whatever data in the existing mailboxes file it can scavenge, then scans all partitions listed in the imapd.conf(5) file for additional mailboxes. EXAMPLES
You want to reconstruct the index files for a user, you have recovered a deleted mail file from backup and given it a suitable name (eg user/ben-lacy/33.), but it is not visible since it is not indexed: reconstruct -r user.ben-lacy If you have the unixhierarchysep:yes option set in /etc/imapd.conf you would need to run: reconstruct -r user/ben.lacy FILES
/etc/imapd.conf CMU
Project Cyrus CYRRECONSTRUCT(8)
All times are GMT -4. The time now is 05:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy