"clear" does not seem to work in SL

Discussion in 'macOS' started by mnpmac, Sep 25, 2009.

  1. mnpmac macrumors member

    Joined:
    Sep 1, 2009
    #1
    In the terminal whether I am in default bash or in tcsh, "clear" cmd does not work. No error msg is printed out either. Just the history is updated.
    "which clear" brings up /usr/bin/clear

    In Leopard I did not have a problem.

    Also all other cmds work fine. It is a mystery.
    Does anyone else have this problem, and any tips on how to fix this?
     
  2. darkpaw macrumors 6502

    darkpaw

    Joined:
    Sep 13, 2007
    Location:
    London, England
    #2
    In the Terminal, type: ls -al /usr/bin/clear

    Mine returns:
    -rwxr-xr-x 1 root wheel 50768 18 May 18:58 /usr/bin/clear

    If yours is different, it might have been corrupted.

    If yours is the same, type: alias

    This will list any alias commands you've got set up. It might be that you have an alias for 'clear' that's not actually doing anything, or it is, but it doesn't echo anything to the screen.
     
  3. mnpmac thread starter macrumors member

    Joined:
    Sep 1, 2009
    #3
    Thanks.
    I have figured out what is going on. Although there is no alias or permission problems, the file size is 0 bytes!:mad:

    ls -lrtF /usr/bin/clear
    -rwxr-xr-x@ 1 root wheel 0 May 18 10:58 /usr/bin/clear*

    Then I found that there are many other files of 0 bytes: diff, env, enscript ....

    How do I fix this? I had done a fresh install of SL onto a new drive. So there was no existing data to corrupt the install.

    I hope this does not require a reinstall of SL. Is there anyway to "repair" SL install? Or can I copy over these files from my Leopard backup disk. (I will try that when I get home). Looking at the timestamp on some of the valid files, I dont think it should matter.
     
  4. Goettel macrumors member

    Joined:
    Oct 1, 2008
    #4
    From what I understood of the Arstechnica review, the filesizes of 0 bytes are due to SL's new filesystem compression. Thoses files were small enough to fit completely into the volume header of something of the sort. So that is not the problem.
     
  5. mnpmac thread starter macrumors member

    Joined:
    Sep 1, 2009
    #5
    But if I do a cat on these files, nothing is there. Wheras for the files which are >0 bytes, the special chars are printed to the screen.
    Also Darkpaw earlier had posted his /usr/bin/clear which is 50768 bytes. Our timestamps are the same, May 18th.
     
  6. mnpmac thread starter macrumors member

    Joined:
    Sep 1, 2009
    #6
    I copied over the files from my Leopard install into SL's /usr/bin/ and all is fine.
    There were quite a number of files missing. I am surprised that such a thing happened during a SL fresh install.

    OS-X cd does not provide an option to repair. If I try to install SL again over my current one, will it overwrite my existing install including user files, or only the system files? Will it keep my current settings or default to what ever it is?
     
  7. darkpaw macrumors 6502

    darkpaw

    Joined:
    Sep 13, 2007
    Location:
    London, England
    #7
    A re-install should keep your existing user settings and files. It only overwrites system files.

    You might want to make sure when you do the install that it is going to do an archive and install (or whatever the equivalent is in SL).
     
  8. Tyr. macrumors member

    Joined:
    Aug 1, 2007
    Location:
    Antwerp, Belgium
    #8
    Files only show with 0 size like that when you look at a Snow Leopard disk from an older version of OSX.
     

Share This Page