What to do for maintainance in OS X?

Discussion in 'Mac Apps and Mac App Store' started by ravenvii, Jul 13, 2004.

  1. ravenvii macrumors 604

    ravenvii

    Joined:
    Mar 17, 2004
    Location:
    Melenkurion Skyweir
    #1
    I know that OS X automatically does some maintainance in the background (cron). But I have my iBook go to sleep when not in use, so those tasks doesn't get done.

    So I want to know how to do it manually. What commands do I use? cron daily, cron weekly, and cron monthly? Is that right?

    And what other maintainence should I do regularly in OS X?

    (Please don't recommend software - I know about OynX and MacJanitor and the such, but I rather do it myself.)

    Thanks!
     
  2. HexMonkey Administrator

    HexMonkey

    Staff Member

    Joined:
    Feb 5, 2004
    Location:
    New Zealand
    #2
    You can run them in the Terminal by typing in:

    Code:
    sudo periodic daily
    sudo periodic weekly
    sudo periodic monthly
    Or by combining them into one command

    Code:
    sudo periodic daily weekly monthly
    You will need to type in your password when prompted. These commands don't give much feedback, but you can tell that they are done once the prompt comes back, before that the cursor will just be at the start of a blank line.

    Other than that, the only maintenance I can think of is to repair permissions every now and then, especially if you are installing a lot of software. You can find this in /Applications/Utilities/Disk Utility. Select your hard disk and click the "Repair Disk Permissions" button.
     
  3. RoadKill macrumors member

    Joined:
    Dec 4, 2003
    Location:
    LONDON UK
    #3
    I have a script called maint. I run it from time to time manually and always before and after a software update.

    I use this command line: sudo ./maint
    and pop in my password

    here's the contents:

    sudo periodic daily
    sudo periodic weekly
    sudo periodic monthly
    sudo diskutil repairPermissions /
    sudo update_prebinding -root / -force

    as you can see, it runs the periodic jobs and then repairs Permissions and updates the prebindings. this may take a while to run on your machine and is definately not one to run from a laptop whilst away from the mains due to the disk activity.

    disclaimer: Whilst this runs fine on my ibook G4 800 I can not be held responsible for what happens on your computer. Backup your data before running scripts you copied from the internet as superuser!
     
  4. frenetic macrumors regular

    Joined:
    Feb 11, 2004
    Location:
    Amsterdam
    #4
  5. Vanilla macrumors 6502a

    Joined:
    Mar 19, 2002
    Location:
    Atlanta, GA
  6. JFreak macrumors 68040

    JFreak

    Joined:
    Jul 11, 2003
    Location:
    Tampere, Finland
    #6
  7. titaniumducky macrumors 6502a

    titaniumducky

    Joined:
    Nov 22, 2003
    #7
    You really don't have to do much. If you want, you can repair permissions from time to time (by using Disk Utility in /Applications/Utilities).

    If you really want to make sure the periodic scripts get run when they should, download the XJanitor script . There are directions there on how to integrate it into cron.

    It will automatically run whenever you set it (they instruct you to use 15 past every hour by default). It checks the logs to see if the daily script has run within the past day, the weekly in the past week, and the monthly in the past month. If not, it runs the necessary ones. I've tested it, and it works great!
     
  8. Vanilla macrumors 6502a

    Joined:
    Mar 19, 2002
    Location:
    Atlanta, GA
    #8
    I hadn't heard of this one, no. An article I was reading in a Mac magazine (can't remember which one) mentioned MacJanitor, which is how I heard about it.

    I've downloaded cocktail and yes, it does seem better. Thanks for the advice.

    Vanilla
     
  9. ravenvii thread starter macrumors 604

    ravenvii

    Joined:
    Mar 17, 2004
    Location:
    Melenkurion Skyweir
    #9
    That's exactly the information I need, thanks all!

    That XJanitor script sounds interesting... it sounds like the newer version of cron that more current Linux distros include. Wonder why Apple doesn't.

    Anyway, thanks!
     
  10. JOE40 macrumors member

    Joined:
    Jan 21, 2002
    Location:
    New Jersey
    #10
    Maintenance

    I know this isn't Terminal commands per se, but I thought I'd add my 2 cents...

    I like to run the above cron commands and then some...
    Then I run Disk Utility : Repair Permissions
    I reboot in single user mode and do /sbin/fsk-y
    Then I Start from an external or other hard drive and run
    Disk Utility: Repair Disk
    Then Disk Warrior 3.0.2 from the external disk or from the cd
    Then Symantec 3.0.2 volume structures repair and defrag and/or
    Techtool Pro 4.0 volume repair and defrag and/or
    Drive 10 1.15 volume repair and defrag and/or
    Intec Software SpeedTools X : Disk Defrag
    The combination of Diskwarrior Directory Optimization and the repair of volume structures and disk optimization for file and ddisk defrag has proven to have been a terrific maintenance and repair routine for me.

    The key is having an external or secondary internal drive to boot from.

    It gives tremendous utility and capability to these programs that are unavailable if booted from the main drive. Also allows for quick, easy reliable and even bootable backups using (example:) Carbon Copy Cloner 2.3 (OS X 10.2 and 10.3) or Prosoft Engineering Data Backup 2.0.3
    Even a new large iPod can make a great external bootable portable drive to help support many different Macs.

    Using something like Disk Inventory X or even just the search/find utility in the Finder to search for files larger than xxxxMb to help locate old unused hard drive space hogs and delete them.
    Whenever possible to save drive space I like to throw away mulitple versions of help files in other languages. Or downloaded software update packages that seem to pile up. The download folder in SpeedDownload comes to mind...
    While viruses aren't that prevalent on the Mac, Virex and Norton/Symantec AntVirus certainly can't hurt and are a good practiced to use when acanning downloaded files from the internet. StuffiDeluxe has a setting that can do it automatically using a virus program you specify in preferences.

    I try to leave my Macs running almost all of the time, occassionally rebooting only if there is trouble or when required by a software install or update.
    Just some thoughts
    Regards -joe40-
     
  11. boxmetogo macrumors newbie

    Joined:
    Aug 2, 2004
    #11
    im very brand new to macs, and i was reading this post, so what you' all are saying is that i should run a maintenance program on my mac every once inahwhile to keep my mac in top shape. right. but what you guys are saying is pretty new to me. can someone explain.?
     
  12. AmigoMac macrumors 68020

    AmigoMac

    Joined:
    Aug 5, 2003
    Location:
    l'Allemagne
    #12
    What?!!!

    That was pretty Microsoftian ...


    ----

    You can run them in the Terminal by typing in:


    Code:

    sudo periodic daily
    sudo periodic weekly
    sudo periodic monthly


    ----

    That was geek!

    :D

    Avoid paranoia ... but be careful !

    I'd do the second option and some backup regularly
     

Share This Page