[ic] Removing expired files and directory from /session and /tm
Tue, 21 Nov 2000 17:22:29 +0100 (CET)
On 21 Nov, Mike Heins wrote:
> Quoting firstname.lastname@example.org (email@example.com):
>> 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
>> find /catalogs/catname/tmp -type d -mtime +1 | xargs rm
>> to remove the files or directory. But I'm not sure about the directory
>> 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
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:
# ls session/*
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
2 3 5 6
# 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
-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 ----------
-------- snip clear-mybol-tmp1.sh ----------
foreach i (*)
find -d $i -type f -mtime +1 | xargs rm -f
Thank you a lot for your time!
buch online firstname.lastname@example.org
Munscheidstr. 14 FAX: +49 209 1671441
45886 Gelsenkirchen FAX: 0209 1671441