potentially dumb question by new mac user

Discussion in 'General Mac Discussion' started by lupinthe3rd, Dec 3, 2003.

  1. lupinthe3rd macrumors newbie

    Sep 22, 2003
    I'm new to this so go easy!

    With a windows machine, it was always useful to do a disk defrag now and again.

    Is there a similar option on the mac, or is it unnecessary?

  2. mmmdreg macrumors 65816


    Apr 14, 2002
    Sydney, Australia
    It's not necessary. The only thing you might want to do if every now and then would be to repair permissions from the startup cd. But most Mac users get away without using that so it's no biggie.
  3. Nermal Moderator


    Staff Member

    Dec 7, 2002
    New Zealand
    Most of the maintenance tasks you had to do in Windows are not necessary on the Mac. The Mac uses a binary tree (I think that's the correct term) to prevent fragmentation. The filesystem is journalled, which means you don't need to run the equivalent of a chkdsk/scandisk.

    There are maintenance scripts that automatically run daily, weekly, and monthly. If possible, you should keep your Mac on 24/7 in order to let this automatic maintenance run. Of course, if you have a laptop then you probably won't end up leaving it on all the time.

    Hope this helps :)
  4. Lz0 macrumors regular

    Jul 20, 2002
    Is there any such thing as a dumb question?

    ... think about it ...
  5. caveman_uk Guest


    Feb 17, 2003
    Hitchin, Herts, UK
    You can run them from the terminal if you don't leave your machine running. IIRC the command is 'sudo periodic daily' or weekly or monthly but don't quote me. Failing that there's a free app called macjanitor which you can download that does the same thing.
  6. sparky76 macrumors regular

    Jul 2, 2003
    I'm a new convert too. I recommend MacJanitor - much less scary than the Terminal for now.
  7. sjcaguy macrumors regular

    Nov 24, 2003
    is there any danger of damaging your system using those terminal commands? I guess people are nervous, but is there anything those commands can do that could potentially mess up the system?

    maybe i just don't get the issue, so correct me if i'm just being dense.
  8. MoparShaha macrumors 68000


    May 15, 2003
    San Francisco
    No, those commands will not damage your system. They run automatically anways, so they'll run regardless of whether you want them to or not. All they do is cleanup cache files, rotate log files, and a few other things. Just normal system maintenance. I highly recommend running them manually if you don't leave your system on 24/7. Keeps things running smoothly.
  9. sjcaguy macrumors regular

    Nov 24, 2003
    just to clarify, what are the commands? the post above wasn't clear about what the were.
  10. Fukui macrumors 68000


    Jul 19, 2002
    I don't know them myself, but to be honest, with my G/F's laptop, we use it without restarting for several months, we just close the lid and it goes to sleep. If something seems "wierd," then usually a log out and then log in clears things up.
  11. sjcaguy macrumors regular

    Nov 24, 2003
    does anyone know if these are the right commands?
  12. whooleytoo macrumors 604


    Aug 2, 2002
    Cork, Ireland.
    Re: potentially dumb question by new mac user

    According to Arstechnica.com, 10.3 automatically defragments every file when it loads it (space permitting). I was quite surprised to read this as I thought it would impose quite a hefty performance hit. If true, this would mean there's no need to ever manually defrag on Panther.
  13. sparky76 macrumors regular

    Jul 2, 2003
    I think the commands are right, but the Terminal is easy to do wrong - try MacJanitor and automate the same procedure.
  14. rueyeet macrumors 65816


    Jun 10, 2003
  15. bryanc macrumors 6502

    Feb 12, 2003
    Fredericton, NB Canada
    The commands are correct

    Start a terminal (/Applications/Utilities/Terrminal.app) and at the prompt type:

    sudo periodic daily

    you will be asked for your administrator password (this happens whenever you try to 'sudo' anything...it's checking to see if you have administrator privileges). Enter your password.

    You can also type

    sudo periodic weekly


    sudo periodic monthly

    Any of these may take some time to execute, depending on how big your drive is, and how long it's been since they were last run.

    If you leave your system running, these scripts will get run automagically by the chron system. However, if you shut your system down, or it goes to sleep when you're not using it, they may not get executed, and rubbish will accumulate on your disk, degrading performance and using up space.

    Something else that you should do periodically is to repair permissions on your boot disk. To do that, start diskutility (/Applications/Utilities/diskutility.app), select your boot disk, and open the first aid tab, and press the 'repair disk permissions' button. This process will also take some time to complete, but you can continue to use your system while it runs.

    I've found a few irritating little problems have evaporated as a result of running 'repair privileges', but I've never really noticed any problems go away after running the periodic scripts. But running them can't hurt (if you want to see what they do, the actual scripts run by the daily, weekly and monthly commands are in /etc/periodic).

    I think you'll find that the maintenance requirements of your Mac are considerably less onerous than your PC, and there is also much less superstitious behaviour associated with running a Mac (on my PC, I used to reboot whenever anything went wrong, and that often fixed the problem, but I never knew why...I haven't rebooted my Mac for months).

  16. billyboy macrumors 65816


    Mar 15, 2003
    In my head
    Apparently the only users who say they do need to use Drive 10 etc to defrag, are the people who own Drive 10. ie until you can see what state your hard drive is in, maybe you should reserve judgement about what OSX is capable of if left to its own devices.
  17. advres Guest


    Oct 3, 2003
    someone asked whether certain commands can mess-up your system. YES!!!! I am not going to tell you what they are because someone out there will probably try one and blame me. Be Careful when playing with the terminal.

    If you don't feel comfortable get cocktail or macjanitor. Cocktail has a few features that macjanitor doesn't though.
  18. 7on macrumors 601


    Nov 9, 2003
    Dress Rosa
    I prefer CronniX. It allows you to reschedule the weekly, monthly, daily thing. I also added a weekly repair permissions thing. It is snazzy.

Share This Page