EzDevInfo.com

file-corruption interview questions

Top file-corruption frequently asked interview questions

How do I check if .wmv file is corrupted?

Whenever I try to play .wmv in an media player, it won't start playing by itself. When I slide the bar a little further only then it does. Could be the .wmv file corrupted from the beginning? How can I check this to make sure if it is?


Source: (StackOverflow)

What causes icon corruption in Windows 7?

I have read this question and this workaround does not work for me.

Start Menu

Now when I launch FileZilla the icon shows fine on the taskbar.

  1. How can I fix this in Windows 7?
  2. What causes icon corruption?

Source: (StackOverflow)

Advertisements

Corrupted files in Git

I have recently removed some folders from my git repos history using the following command:

git filter-branch --index-filter 'git rm -r --cached var' -- --all

Unfortunately I cannot pull anymore from this repos, This is the error set I'm getting:

git pull
remote: Counting objects: 3953, done.
remote: Compressing objects: 100% (2810/2810), done.
error: garbage at end of loose object '4b391c2cc93ccc8d2f7262335629a7f81d6bcbe0'
fatal: object 4b391c2cc93ccc8d2f7262335629a7f81d6bcbe0 is corrupted
fatal: index-pack failed

Source: (StackOverflow)

How to open corrupted ZIP files?

How can I open (or repair) corrupted ZIP files on Windows?

Is there a way to force 7-Zip to open them?


Source: (StackOverflow)

Can a slow internet-connection corrupt a downloaded file?

When downloading a big file, can a slow internet connection cause it to corrupt?


Source: (StackOverflow)

Automating the scanning of graphics files for corruption

Does anyone know of a way to check graphics files (particularly JPEG, GIF, and PNG) for corruption (preferably in an automated way)?


Explanation:

A few days ago, a command worked incorrectly and ended up deleting thousands of graphics files from a FAT32 volume that was practically out of space. I’ve used several different file/photo-recovery programs, but naturally, they are limited in how much they can recover (though fortunately the volume has 8KB clusters, which helps somewhat).

Anyway, some of the larger files, that were fragmented, are now corrupt. Some of them are not even real files at all (the recovery software merely dumped the clusters that were pointed to by now-overwritten directory entries), while others are broken because of fragmentation.

Moreover, because some picture formats embed a smaller version of the picture as a thumbnail, scanning the thumbnails for corruption is not reliable because it may be intact while the actual file (i.e., the picture when viewed full-size), could be corrupt.


Here are a couple of examples:

Here’s the second one. It’s so damaged that it doesn’t display anything.

damaged image

(A third one wouldn’t even upload because it doesn’t even have the correct header!)


Source: (StackOverflow)

Which archive file formats provide recovery protection against file corruption?

I use my external HDD to back up my files, by putting them into large archive files.

I have thousands of tiny files, and put them into archives of 500MB to 4.2GB in size, before sending them to the external HDD. But, does one hard disk failure destroy the whole archive or only one file in the archive? I fear that one flipped bit could render large parts of the archive useless.

Things like CRC checks can alert you to the existence of corruption, but I am more interested in the ability to recover the undamaged files from a corrupted archive. What archive file formats would provide the best ability to recover from such failures, either through the native design of the archive structure or the existence of supplementary recovery tools? Is there any difference in this capability between zip and iso files?


Source: (StackOverflow)

Validate/verify PDF files integrity

Is there any tool which I can run on the PDFs archives (all directories) and finally it lists/identifies the corrupt/invalid PDFs?

I have hundreds of PDF files (related to documentation etc.) on my computer (Windows machine), and very often I receive/have to send dozens of PDFs via email. It is now a normal routine that the PDF I receive or send is corrupted. This creates serious trouble sometimes, when the source file (e.g. Word file or the Tex file is missing/not available instantly).

Checking these thousands of PDFs is not possible in finite time, so I searched for a tool which I can run once and it scans all PDFs (in directories and sub-directories), and finally I get a list of those files which I should re-create. Upto now, it seems there is no such tool.


Source: (StackOverflow)

File copy program that generates checksums of the data while copying too

My question in short: is there a tool that copies a file from directory A to B while, simultaneously, generating the checksum of the file it has copied/read, without doing an extra read/pass just to generate the said checksum?

I will be copying a few TBs of files from one HDD to another and instead of:

  1. Copy files from HDD1 -> HDD2 (X hours)
  2. Generate checksums of files on HDD1 (Y hours)
  3. Verify checksums of files on HDD2 (~Y hours)

I was thinking of a more streamlined process:

i. Copy files from HDD1 -> HDD2 and generate checksums of the files copied as well (Z hours)

ii. Verify checksums of files on HDD2 (~Y hours)

My assumption is that Z ~= X because the program that can so this will have read the complete file (as it's copying it from one HDD to another) and hence does not need to read the file again just to generate its checksum.

Now I know this idea of mine might not work, if for example, the OS uses DMA to copy the file, and I am not sure what technique Windows 7 uses to copy files from one HDD to another.

Any suggestions to this effect will be appreciated - specially speeding up the copying process and making sure the transfer is 1:1 without corruption or missing files.


Source: (StackOverflow)

Spurious alleged file corruption on Windows 7

Recently my Laptop sometimes warns about corrupted files on the hard drive (Samsung SSD PB22-JS3 TM). This has only happened so far when updating (or checking out) an SVN repository with either TortoiseSVN or the command line Subversion client.

The fun thing is that the corrupted file has always been a .svn directory (although the directory entry may contain files in that directory too, if they're small enough — which should be the case with SVN). However, when looking into the warned-about directory I notice nothing strange or unusual and don't get any more warnings about it and another try (SVN stops updating once that error occurs — TortoiseSVN even with an appropriate error message) of updating the working copy works (well, mostly; sometimes it does it again, albeit with a different directory).

Since the laptop is only a few months old I doubt the SSD is failing already—five months of normal usage shouldn't be too surprising. Also it (so far) occurred only with SVN updates on a large repository. Maybe that's too many writes in a short time and some part between the software and the hardware doesn't quite catch up fast enough or so — I don't know enough about this to actually make an informed guess here.

Anyone knows what's up here?

ETA: Note to add: I've run chkdsk (it seems to schedule itself anyway when this happens) and it didn't find anything out of the ordinary.


Source: (StackOverflow)

Does "Mount volume as removable medium" reduce the chances of data corruption with a TrueCrypt encrypted USB hard drive?

I have an external USB hard drive plugged in to my laptop some of the time. The external drive is whole drive encrypted using TrueCrypt.

I always check "Mount volume as removable medium" in the hope that it will offer better data corruption protection from accidental disconnection of the external drive. However, according to the TrueCrypt manual:

Mount volume as removable medium

Check this option, for example, if you need to prevent Windows from automatically creating the 'Recycled' and/or 'System Volume Information' folders on the volume (these folders are used by the Recycle Bin and System Restore facilities).

I don't mind these folders being created, so are there any other advantages in selecting "Mount volume as removable medium"?

My reason behind this questions is that I would like to mount it as a non-removable drive so I can add some its contents to my Windows 7 libraries (which don't support removable drives).


Source: (StackOverflow)

What is the practical value of redundancy in zip files?

How is redundancy implemented in zipping, and how do I benefit from it?

I'd assume it consists of something like storing the lookup tables twice so a single defect does not invalidate the whole rest of the file. Regarding the use case, possibly when storing the file on a CD that gets a slight scratch?

However, I personally never got any profit from adding redundancy to zip files, and I tend to omit them, so I was wondering if they are actually useful in practice.


Source: (StackOverflow)

How do I fix a corrupted copy of .Net Framework on Windows 7?

I receive the following error when trying to run applications that require .net Framework 3.5:

Could not load file or assembly 'System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies. The module was expected to contain an assembly manifest.

I've tried numerous fixes, such as reinstalling through ad/remove software, copying the .net folder over from a clean windows 7 install, and running the .net cleanup tool.

Just wondering if anyone has run into this issue before, or has an idea on how to fix it.


Source: (StackOverflow)

How can I create a file with invalid Windows timestamps?

I'd like to create a file with an invalid created/modified/accessed timestamp. To be invalid it should be a date and time before 12:00 midnight January 1, 1601 C.E. UTC


Source: (StackOverflow)

Does moving files around my computer causes data corruption?

I've got a silly question floating in my head: If I have a file in C:/test1 and move it to C:/test2 then to D:/Other and so on... again and again, may the file become corrupted? What about making copies of the file again and again (copy of copy of copy of copy)?


Source: (StackOverflow)