PDA

View Full Version : potentially dumb question by new mac user


lupinthe3rd
Dec 3, 2003, 03:20 AM
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
Dec 3, 2003, 03:25 AM
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
Dec 3, 2003, 03:53 AM
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 :)

Lz0
Dec 3, 2003, 05:18 AM
Is there any such thing as a dumb question?

... think about it ...

caveman_uk
Dec 3, 2003, 05:20 AM
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
Dec 3, 2003, 05:26 AM
I'm a new convert too. I recommend MacJanitor - much less scary than the Terminal for now.

sjcaguy
Dec 3, 2003, 09:50 AM
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
Dec 3, 2003, 10:12 AM
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
Dec 3, 2003, 10:47 AM
just to clarify, what are the commands? the post above wasn't clear about what the were.

Fukui
Dec 3, 2003, 11:18 AM
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
Dec 3, 2003, 11:34 AM
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
Dec 3, 2003, 11:38 AM
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
Dec 3, 2003, 11:39 AM
I think the commands are right, but the Terminal is easy to do wrong - try MacJanitor and automate the same procedure.

rueyeet
Dec 3, 2003, 12:14 PM
Here's a link to an article at O'Reily's MacDevCenter with some helpful tips on how to keep a Panther installation purring:

http://www.macdevcenter.com/pub/a/mac/2003/11/21/maintenance.html

Some of the tips will also work under Jaguar, and the daily/weekly/monthly cleanup routines are in there too.

bryanc
Dec 3, 2003, 12:18 PM
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
Dec 3, 2003, 01:49 PM
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
Dec 3, 2003, 06:10 PM
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
Dec 3, 2003, 06:17 PM
I prefer CronniX. It allows you to reschedule the weekly, monthly, daily thing. I also added a weekly repair permissions thing. It is snazzy.