Weird computer behaviour

This morning I finished writing annotations for the latest batch of Irregular Webcomic! strips. So that batch is out of the way… and I can start thinking about the next batch.

Besides going out for a bit and getting some fresh air and doing some normal household things, I spent a bit of time today wrestling with a weird computer problem.

I have some files on my Mac that I copied across from a Windows machine. They ended up with permissions 555, so I changed them to 644 as is usual. But when I opened a file to edit in my usual GUI editor (BBEdit), it complained that I didn’t have write permission to the file, and asked if I wanted to change the permission. Without thinking too much I clicked yes, edited the file, and saved it.

But then after I uploaded it to my web server, it was still the unedited version. And looking at the file from the command line with vi, it was the unedited version. But… re-opening the file from the fie browser into BBEdit showed the edited version that I’d saved… at the same file path location!

So now there seem to be two different versions of the file at the same file location somehow. I tried editing using vi from the command line, and that does what I expect, saving a new version, but if I open it in BBEdit, it still appears as the version I saved using BBEdit, not with the edits made with vi.

I really don’t understand what’s going on here. The best thing I can guess is that Windows set some sort of non-writeable flag that BBEdit detects, and then it works around it by asking if you want to change the file permissions… and then it secretly writes the new version to a different place in the file system, but maintains a link to the original location, so that if you ever open the original file location again, BBEdit actually fetches the secret copy – all the while telling you that it’s looking at the original file location. Because there are actually now two different versions of the file, apparently in the same file location, but obviously that’s impossible.

I can work around this by editing only in vi, but I’d like to know what the heck is going on, and if there’s any way to get BBEdit to open the original file location, rather than its own secret (modified) copy.

New content today:

4 thoughts on “Weird computer behaviour”

  1. There may be two files with slightly different capitalization – Windows is not case-sensitive, but Linux/Unix is.

  2. Run fsck from the terminal? Run updatedb as root and then locate the filename, which should show any copies?

    I’m a Linux guy, so my suggestions assume the Mac terminal has basic shell tools (which it should, it’s BSD under the hood).

    1. I’m not a guru, and I talked with some of my friends who are more expert in Unix matters, and I think I don’t want to mess around too much with stuff like that. I’ve worked around the issue and don’t need to edit the file again, so hopefully I can just forget about it.

Leave a Reply

Your email address will not be published. Required fields are marked *