Quantcast

Forums | MacLife

You are not logged in.

#1 2005-03-12 11:38 pm

TheConfuzed1
Faking Sanity
Registered: 2000-04-19
Posts: 20194

Deleting a File That Is Owned By Root

Okay, I know that you guys will be jumping at the chance to be the first one to answer this, in an attempt to prove your geekiness... At least, I hope so.  wink

As mentioned in this thread, system.log has taken over my hard drive.  It lives here:

Panther/private/var/log/System.log

Please tell me how to kill it.  Thank you, drive through.  wink


The storm starts when the drops start dropping.  When the drops stop dropping, the storm starts stopping.

Last Fm

Offline

 

#2 2005-03-13 2:31 am

tpark
The Legend
From: Earth
Registered: 2004-10-05
Posts: 171
Website

Re: Deleting a File That Is Owned By Root

sudo


nominoc - nominoc.com

Offline

 

#3 2005-03-13 2:31 am

tpark
The Legend
From: Earth
Registered: 2004-10-05
Posts: 171
Website

Re: Deleting a File That Is Owned By Root

explanation lives in ur hdd.

man sudo


nominoc - nominoc.com

Offline

 

#4 2005-03-13 2:57 am

TheConfuzed1
Faking Sanity
Registered: 2000-04-19
Posts: 20194

Re: Deleting a File That Is Owned By Root

How do I execute it?  I get that I have to enter "sudo" into the terminal.  But then what?

man sudo does not explain this.  confused


The storm starts when the drops start dropping.  When the drops stop dropping, the storm starts stopping.

Last Fm

Offline

 

#5 2005-03-13 8:02 am

caol
Member
From: Ottawa, ON, Canada
Registered: 2003-02-02
Posts: 328

Re: Deleting a File That Is Owned By Root

Have a look at this thread

The answer is a ways down.


To teach superstitions as truth is a most terrible thing.
            - Hypatia of Alexandria

Offline

 

#6 2005-03-13 11:13 am

skymt
Lycanthropic Cowboy
From: Limbo until Q2 2006
Registered: 2004-09-02
Posts: 775

Re: Deleting a File That Is Owned By Root

Or, I could just post it here.

1. Open Terminal.
2. Type "sudo rm /private/var/log/System.log"
3. Hit return.
4. Type in your password.
5. Hit return.

Done!

Actually, there's one more step:
6. Learn to use the Terminal, or get a friend who can.

Offline

 

#7 2005-03-13 11:37 am

TheConfuzed1
Faking Sanity
Registered: 2000-04-19
Posts: 20194

Re: Deleting a File That Is Owned By Root

Thank you so much skymt!  That exactly what I was looking for!

I would absolutely like to learn more about the terminal and how these things work.  Is there a particular book that you would recommend for someone to start from scratch?


The storm starts when the drops start dropping.  When the drops stop dropping, the storm starts stopping.

Last Fm

Offline

 

#8 2005-03-19 7:39 am

laughinol
Member
Registered: 2003-09-20
Posts: 406

Re: Deleting a File That Is Owned By Root

just a note:

rm is forever
sudo rm is forever + smurf'tmeantodothat(sometimes)

Offline

 

#9 2005-03-19 1:56 pm

[MA] Flying_Meat
Member
From: Frisco?
Registered: 2001-03-31
Posts: 8543

Re: Deleting a File That Is Owned By Root

system.log is supposed to get rotated and compressed when the "daily" cron task is run.
it's handy to look at that log if weirdness has been occurring on your machine.

if your daily has not been run for a while, then do this in the terminal:
sudo periodic daily

likewise:
sudo periodic weekly

and:
sudo periodic monthly

< *wait for each command to complete before issuing the next command. >

you could install anacron (apple's download site) and the tasks will be run, even if your computer has been asleep or off during the scheduled times for these scripts, when your machine becomes active again.

or,
you could edit the crontab file so that the scripts are run at a time when your machine is normally on and awake.
use "cronnix" for this if you like gui tools. smile

there are a number of gui utilities that will let you run these three tasks (as well as other system maintenance routines...) "on demand."

Last edited by [MA] Flying_Meat (2005-03-19 1:58 pm)


...and watch out for the flying meat!

Offline

 

#10 2005-04-05 5:21 am

greenscreen76
Member
From: the matrix
Registered: 2001-03-24
Posts: 535

Re: Deleting a File That Is Owned By Root

[MA] Flying_Meat wrote:

system.log is supposed to get rotated and compressed when the "daily" cron task is run.
it's handy to look at that log if weirdness has been occurring on your machine.

if your daily has not been run for a while, then do this in the terminal:
sudo periodic daily

likewise:
sudo periodic weekly

and:
sudo periodic monthly

< *wait for each command to complete before issuing the next command. >

you could install anacron (apple's download site) and the tasks will be run, even if your computer has been asleep or off during the scheduled times for these scripts, when your machine becomes active again.

or,
you could edit the crontab file so that the scripts are run at a time when your machine is normally on and awake.
use "cronnix" for this if you like gui tools. smile

there are a number of gui utilities that will let you run these three tasks (as well as other system maintenance routines...) "on demand."

can i delete crontab or rename it to hide it from the system thereby ending automation of these maintenance tasks so that i can just do them myself when i feel like it or is crontab essential to the system integrity? why does a file named "crontab" work as a command scheduler anyway? does it have to do with what it is named? why is it named crontab anyway? why isn't it called something else?

thanks in advance.


iMac (Flat Panel)...800MHz...256MB RAM...Combo Drive...OS 10.2.8 Build 6R73

iPod 3G...30GB...v.2.3

Offline

 

#11 2005-04-05 11:29 am

Fracai
Evacipate
From: St. Elsewhere
Registered: 2000-05-25
Posts: 2844

Re: Deleting a File That Is Owned By Root

trying to disable cron execution by deleting any files named crontab would be a bad idea.  rather you should edit the crontab file by commenting out lines and then refresh the crontab.  man cron and man crontab for more info.

also, I'd say it's a bad idea to run them when you feel like it.  running them too often or not often enough are equally bad or harmless.  in general, they're run at specific times for a reason wink  if you want to examine the output you can browse /etc/var/log/weekly.out etc.  I think that's the location anyway.  just open console.app and browse away.


   i am jack's amusing sig file
        http://alum.wpi.edu/~arno/i/s.png
Satellite Lot :: Second Summer

Offline

 

#12 2005-04-05 11:34 am

greenscreen76
Member
From: the matrix
Registered: 2001-03-24
Posts: 535

Re: Deleting a File That Is Owned By Root

well as far as how frequently you run them i've heard it doesn't really hurt to run them all several times a day if you want. i think they said that on the macjanitor site. thanks for the help with my other topics btw. you must have just woke up and saw all my new posts huh? i've noticed some of your other replies on other topics and you are a good help. hope you have a nice day.


iMac (Flat Panel)...800MHz...256MB RAM...Combo Drive...OS 10.2.8 Build 6R73

iPod 3G...30GB...v.2.3

Offline

 

#13 2005-04-08 3:21 am

Kosh
The Enigmatic One
From: Somewhere on or near Earth
Registered: 2003-01-18
Posts: 633

Re: Deleting a File That Is Owned By Root

greenscreen76 wrote:

well as far as how frequently you run them i've heard it doesn't really hurt to run them all several times a day if you want.

It depends on what you mean by "hurt".  The scripts (particularly weekly & monthly) make some assumptions about how frequently they run.  Also, there are a set number of retained "rolled" (compressed archived) logs before they are deleted, which will limit what can be done to research issues.  For example, the daily job keeps eight (compressed) versions of system.log, to let you look back through a week to track down issues.  If you run periodic daily eight times in a day, you no longer have the ability to look back to even the previous day.

Basically, the scripts are designed and tuned for execution on a specific frequency.  No, you probably won't break anything if you run them more often, but it isn't helpful.


They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.
  -- Benjamin Franklin, 1759

Offline

 

#14 2005-04-22 2:39 pm

GreenAlge
The Algae
From: Who knows?
Registered: 2003-09-03
Posts: 802
Website

Re: Deleting a File That Is Owned By Root

skymt wrote:

Or, I could just post it here.

1. Open Terminal.
2. Type "sudo rm /private/var/log/System.log"
3. Hit return.
4. Type in your password.
5. Hit return.

Done!

Actually, there's one more step:
6. Learn to use the Terminal, or get a friend who can.

lol ^ should have been the first reply. ^

_Nik

Offline

 

Board footer

Powered by PunBB 1.2.6
© Copyright 2002–2005 Rickard Andersson