Ads by Google

Showing posts with label file corruption. Show all posts
Showing posts with label file corruption. Show all posts

Monday, March 31, 2008

Finding out which file belongs to which package in cygwin

Today, while trying to add some directories to the PATH variable in my startxwin.bat, I managed to corrupt the file.

I don't know what was wrong but the script refused to start the X server.

Well, I'll just recover the script by re-installing the package I thought.

The only problem is, I don't know which package the file belonged to! And I didn't want to re-install ALL the X packages of the X-server. That would have been the last resort, anyway.
A google search revealed that someone else had faced the same problem and cygwin had a package search which does the same thing; it can search within the packages.

I found the package and reinstalled it from the local copy on my HDD and all was well. X server started up as usual along with my customisations which I applied again.

Monday, February 4, 2008

Mea culpa. Listen to Emacs

If Emacs warns you about something, please stop what you're doing and understand what it's trying to say.

"File on disk has changed, do you want to save?"

This while remote editing the file. Blithely continuing, I hit C-x C-s and managed to corrupt the file.

In the split instant of saving the file and going "hmmm...who could be editing the file?"

ack! my colleague who was fixing a small typo .

Desperately pounding C-g, C-g, C-g.


No dice. I had a truncated file!

Good thing I had taken a backup the day before. A few calls and sheepish explanations later, sanity was restored.

If Emacs ever tells you something, listen.....carefully.