Really, really weird file in Yosemite

Discussion in 'OS X Yosemite (10.10)' started by TheBSDGuy, Oct 26, 2014.

  1. TheBSDGuy macrumors 6502

    Joined:
    Jan 24, 2012
    #1
    My system has several partitions on it for web development using several different OS X versions. I came across an oddity today that I can't understand.

    I've been using the internal drive on my system and moving over some stuff from my other OS development versions to my Yosemite partition. My Yosemite partition on the internal drive has been updated since beta versions of the OS and it occurred to me there might be left over rubbish from some of the betas, so I thought what i would do was a fresh install on a Firewire external hard drive, copy what I needed over to that, format the Yosemite partition on the internal hard drive, then use Phoenix to clone over the fresh install with all my stuff from the external HD with the fresh install and all my tools.

    Some of the stuff I use uses root level access and goes into the "/bin" directory. I'm doing this from a mounted Mountain Lion partition. When I changed the directory to "/bin" on the Firewire drive (fresh Yosemite), I found a file named "[". This drive is fairly old so I thought maybe one of the sectors was bad or a file didn't get copied properly. i attempted the following:

    /bin/ls -al

    and I get this:

    -rwxr-xr-x@ 2 root wheel 18480 Sep 9 18:44 [

    If I enter the command:

    file [

    The OS responds:

    \[: Input/output error

    I tried:

    more [

    and once again get the input/output error. By the way, I'm doing this as root.

    The Firewire drive is pretty old so I thought maybe its time had come. I got out my copy of Scannerz and did a scan on it, expecting the thing to fail within a few gigabytes, and instead it scanned it perfectly - no errors, no weak sectors, no cable problems, no problems at all. Scannerz, by the way does low level hardware scanning so it can't be fooled by permission oddities or resource forks and it can pretty much find anything wrong. Nothing wrong at all. In fact the drive's apparently in pretty good shape.

    I should have checked my internal drive first, because there, on the Yosemite partition in the /bin directory is the same file, and it exhibits the exact same characteristics - it reports an I/O error any time I try to access the file.

    Finally, and this is the real kicker, I decided to just format the Yosemite partition and use Phoenix to clone the Yosemite fresh install on the Firewire drive to the newly formatted partition on the internal hard drive. I thought for sure Phoenix would fail to copy this file over and it would show up in the log files. Instead, it cloned it perfectly INCLUDING THE /bin/[ file.

    What the h*ll is this thing? Why am i getting I/O errors any time I try to access it? Is it because of some type of resource fork settings (which I don't understand???)

    FYI Phoenix hasn't been fully certified for Yosemite yet, but it seems to clone the volumes over just fine if it's done as a basic full volume clone.
     
  2. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #2
    I see it on Yosemite also. The time/date matches up with the other executables, so looks like it comes with a Yosemite install. No idea what it is though.

    [​IMG]
     
  3. Fzang, Oct 26, 2014
    Last edited: Oct 26, 2014

    Fzang macrumors 65816

    Fzang

    Joined:
    Jun 15, 2013
    #3
  4. Weaselboy Moderator

    Weaselboy

    Staff Member

    Joined:
    Jan 23, 2005
    Location:
    California
    #4
  5. TheBSDGuy thread starter macrumors 6502

    Joined:
    Jan 24, 2012
    #5
    The "[" file appears to be an exact copy of the "test" command. I was unaware that this had been around. In any case, the I/O errors only occur when attempting to access the drive from a non-Yosemite booted volume (I'm using Mountain Lion right now). I'm guessing that the resource forks are preventing access to the file. I can do whatever I want to with the file if I'm in a booted Yosemite volume. Phoenix had no problems cloning it over, so apparently it's handling resource forks in its cloning process.

    Oh well, live and learn!
     

Share This Page