Lze mazat adresar temp ?

Derfinak Jan derfinak na hron.fei.tuke.sk
Pátek Leden 30 19:10:55 CET 1998


On Fri, 30 Jan 1998, Leos Bitto wrote:

> On Fri, 30 Jan 1998, Derfinak Jan wrote:
> 
> > > Ano, ma, jmenuje se to tmpwatch a napsal to primo Erik Troan. Az teprve
> > > kdyz jsem si cetl popis toho programu, uvedomil jsem si jak moc je na to
> > > potreba zvlastni program a proc nestaci jen find.
> > 
> > Mohol by si to podrobnejsie rozobrat?
> > 
> 
> Myslim ze nejlepsi byde precist si manualovou stranku k tmpwatch. V
> podstate ale jde o to ze je neduverivy uplne ke vsemu, misty az
> paranoidni. A to je dobre. ;-)
> 

No pytal som sa preto, lebo som tmpwatch pouzival v RH 4.1 a zistil som, ze
to nemazalo takmer nic. Tak som zacal pouzivat spolahlivy find. Vtedy tam
este nebola manualova stranka, takze som nevedel co si mam o tom mysliet.
Teraz som sa teda pozrel man.

       When changing directories, tmpwatch is very  sensitive  to
       possible  race  conditions  and will exit with an error if
       one is detected. It does not follow symbolic links in  the

Symlinky nesleduje ani find, pokial sa mu to neprikaze pomocou -follow.

       directories  it's  cleaning  (even  if  a symbolic link is
       given as its argument), will not switch filesystems,

Ani find s parametrom -mount (-xdev).

        and only removes empty directories and regular files.

Tak na to pouzivam find v dvoch krokoch. Najpr s parametrom -type f, zrusim
vsetky subory, starsie ako zadany datum. Potom find spustim znova s
parametrom -type d, a prikazom rmdir rusim vsetky prazdne adresare. (starsie
ako je ich "zivotnost")

       tmpwatch dates files by their atime, not their  mtime.  If
       files  aren't being removed when ls -l implies they should
       be, use stat(1) to examine the files atime to see if  that
       explains the problem.

-atime, -mtime, -ctime, kazdy si moze vybrat, co mu vyhovuje.

find este navyse umoznuje urcit vynimky, ktore sa nebudu mazat (napr. na
zaklade mena, uid, gid, ...).

Mozno, ze teraz tmpwatch funguje tak ako ma, ale ja som spokojny s find-om,
takze ak ma niekto nepresvedci o jeho nebezpecnosti, menit nebudem.


				jano

----- I can't get no satisfaction -----
			Rolling Stones
 



Další informace o konferenci Linux