[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [ic] Removing expired files and directory from /session and /tmp
On 21 Nov, Mike Heins wrote:
> Quoting jojo@buchonline.net (jojo@buchonline.net):
>> Hi list,
>>
>> I can use bin/expired to remove the files. But it removes the files
>> from /session only and not all the empty directories too. There a lot
>> of old files in /tmp too. I know, I can use a command like
>>
>> find /catalogs/catname/tmp -type f -mtime +1 | xargs rm
>>
>> or
>>
>> find /catalogs/catname/tmp -type d -mtime +1 | xargs rm
>>
>> to remove the files or directory. But I'm not sure about the directory
>>
>> /tmp/addr_ctr
>> and
>> /tmp/retired
>>
>> The name "retired" seems to me, I can remove all directories and files
>> inside that directory "/tmp/retired". Right?
>>
>> What is the best way to clean up all expired files _and_ directory from
>> /session _and_ /tmp?
>>
>
> For performance, it is actually better to leave the directories in place.
> That way they don't need to be created next time a session is bound for
> there.
I'm not sure and I've difficult to understand you.
Do you mean the directories "/tmp/retired" and "/tmp/addr_ctr" with the
whole contents? Or do you mean for example:
The directories
# ls session/*
session/2:
E
session/3:
F
session/5:
R
session/6:
c
is empty. All that directories will be created next time. Right?
If all that directories is still there, we spent time to create the
directories and get a better performance. Right?
And what is with such directories like
ls tmp/retired/*
tmp/retired/2:
E
tmp/retired/3:
F
tmp/retired/5:
R
tmp/retired/6:
c
and
ls tmp/*
tmp/3:
3FFteSm4.127644f8180addf3534b1d4db1abf414
3FFteSm4.1b1106769e747a8dda52727cbeaa4de8
[DEL]
3FFteSm4.fb7852ea72d591a712ba51e49a7c8f43
tmp/5:
5R3RzXAB.053bb60c2bb7d0c40b40f0986e08cd32
[DEL]
5R3RzXAB.fb7852ea72d591a712ba51e49a7c8f43
tmp/addr_ctr:
1
tmp/retired:
2 3 5 6
and
# ls -l tmp/3/*
-rw-rw---- 1 jojo jojo 9681 9 Nov 12:50 tmp/3/3FFteSm4.127644f8180addf3534b1d4db1abf414
-rw-rw---- 1 jojo jojo 9684 9 Nov 12:36 tmp/3/3FFteSm4.1b1106769e747a8dda52727cbeaa4de8
[DEL]
-rw-rw---- 1 jojo jojo 354877 9 Nov 14:17 tmp/3/3FFteSm4.fb7852ea72d591a712ba51e49a7c8f43
?
Can I remove that files? How about
-------- snip clear-mybol-tmp.sh ----------
#!/bin/sh
dir=/www/buchonline.org/ic/catalogs/bol
cd ${dir}/tmp
/home/mvend/bin/clear-mybol-tmp1.sh
--------snip----------
and
-------- snip clear-mybol-tmp1.sh ----------
#!/bin/csh
foreach i (*)
find -d $i -type f -mtime +1 | xargs rm -f
end
--------snip----------
?
Thank you a lot for your time!
Joachim
--
Hans-Joachim Leidinger
buch online jojo@buchonline.net
Munscheidstr. 14 FAX: +49 209 1671441
45886 Gelsenkirchen FAX: 0209 1671441
_______________________________________________
Interchange-users mailing list
Interchange-users@www.minivend.com
http://www.minivend.com/mailman/listinfo/interchange-users