Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Mac OS X > how to execute maintenance from terminal

how to execute maintenance from terminal
Thread Tools
Mac Enthusiast
Join Date: Apr 2003
Location: Monterrey, Mexico
Status: Offline
Reply With Quote
Aug 25, 2004, 01:23 PM
 
Hi all,

I forgot were I saw the commands to execute the daily, weekly and monthly maintenance commands that are used in the terminal. I used the search, but with no avail.

I know I can execute them using Onyx, but I want to start using the terminal.

it goes like psudo weekly (enter) .. something like that. Do you happen to know those commands?

regards
     
Mac Elite
Join Date: May 2001
Location: Earth
Status: Offline
Reply With Quote
Aug 25, 2004, 04:48 PM
 
sudo /etc/daily
sudo /etc/monthly
sudo /etc/weekly

should do the trick.
     
polendo  (op)
Mac Enthusiast
Join Date: Apr 2003
Location: Monterrey, Mexico
Status: Offline
Reply With Quote
Aug 25, 2004, 04:55 PM
 
Thanks, I will try it.

I think I remember the word "maintenance" at the command prompt instead of the /etc/. Anyway, I will give it a go.

thanks
     
Ω
Mac Elite
Join Date: Nov 2003
Status: Offline
Reply With Quote
Aug 25, 2004, 05:32 PM
 
Maybe you were thinking of

sudo periodic daily ......
     
Grizzled Veteran
Join Date: May 1999
Location: Seattle
Status: Offline
Reply With Quote
Aug 25, 2004, 08:06 PM
 
how hard is it to set these up to run at startup?
1.25GHz PowerBook


i vostri seni sono spettacolari
     
polendo  (op)
Mac Enthusiast
Join Date: Apr 2003
Location: Monterrey, Mexico
Status: Offline
Reply With Quote
Aug 25, 2004, 10:52 PM
 
thats the one "?".. thanks.

Boondoggle: I guess with apple script these can be done automatically?
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Aug 25, 2004, 11:10 PM
 
Originally posted by Boondoggle:
how hard is it to set these up to run at startup?
With anacron (which is available via Fink) one can set it up so that the daily, weekly, monthly cron jobs will be checked and if they haven't been run within their respective periods they will be run shortly after bootup. That is to say... if it has been 24 hours since /etc/daily was run anacron will automagically run /etc/daily. If it has been 7 days since weekly was last run anacron will run it. /etc/monthly will be run similarly.

This is useful for workstations and laptops that may not stay turned on all the time. Anacron will ensure that they are run when neccessary without any user intervention.

Configuration is simple. Just load /sw/etc/anacrontab in a text editor and it tells you what to do.
-DU-...etc...
     
Mac Elite
Join Date: Sep 2003
Location: Reno, Nevada
Status: Offline
Reply With Quote
Aug 27, 2004, 06:06 PM
 
Originally posted by pat++:
sudo /etc/daily
sudo /etc/monthly
sudo /etc/weekly

should do the trick.
What exactly to these commands do. Before someone like me types them in and blows up their comptuer. LOL., but seriously what do the do?
     
Senior User
Join Date: Jan 2001
Location: Mahwah, NJ USA
Status: Offline
Reply With Quote
Aug 27, 2004, 07:09 PM
 
Originally posted by spatterson:
What exactly to these commands do. Before someone like me types them in and blows up their comptuer. LOL., but seriously what do the do?
They are part of the essential maintenance of your system. Some things will not work as well or work at all unless they are done.

You can see exactly what they do by just opening a terminal and doing:

less /etc/daily

They are fairly well commented where what they do is not obvious. If you are not at all familiar with shell scripts they may be a bit difficult to read. But to some people it is just as easy as reading a comic book ;-)

In any case... running them will NOT "blow up" your system. They are run automagically anyhow if your system is left on for over a day, week, month, whatever. If your system does blow up it means that something was wrong with it :-D
-DU-...etc...
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 06:40 AM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2