Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

lupinthe3rd

macrumors newbie
Original poster
Sep 22, 2003
27
0
Tokyo
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?

Thanks.
 

mmmdreg

macrumors 65816
Apr 14, 2002
1,393
0
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.
 

Nermal

Moderator
Staff member
Dec 7, 2002
20,644
4,044
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 :)
 

caveman_uk

Guest
Feb 17, 2003
2,390
1
Hitchin, Herts, UK
Originally posted by Nermal

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.
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.
 

sparky76

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

sjcaguy

macrumors regular
Nov 24, 2003
126
29
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.
 

MoparShaha

Contributor
May 15, 2003
1,646
38
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.
 

sjcaguy

macrumors regular
Nov 24, 2003
126
29
just to clarify, what are the commands? the post above wasn't clear about what the were.
 

Fukui

macrumors 68000
Jul 19, 2002
1,630
18
Originally posted by sjcaguy
just to clarify, what are the commands? the post above wasn't clear about what the were.
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.
 

sjcaguy

macrumors regular
Nov 24, 2003
126
29
Originally posted by caveman_uk
IIRC the command is 'sudo periodic daily' or weekly or monthly but don't quote me.

does anyone know if these are the right commands?
 

whooleytoo

macrumors 604
Aug 2, 2002
6,607
716
Cork, Ireland.
Re: potentially dumb question by new mac user

Originally posted by lupinthe3rd
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?

Thanks.

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.
 

sparky76

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

bryanc

macrumors 6502
Feb 12, 2003
335
0
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

and

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).

Cheers
 

billyboy

macrumors 65816
Mar 15, 2003
1,165
0
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.
 

advres

Guest
Oct 3, 2003
624
0
Boston
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.
 

7on

macrumors 601
Nov 9, 2003
4,939
0
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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.