Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Build Question / Advice

Quote Reply
Build Question / Advice
Hi, being new to Links, I am not sure if I am doing something wrong here, but please read (and respond).

Each time I re-build my static pages, old directory and files which are no longer used are not removed. I found this out when I made about 200 categories in the root by mastake and spent a bit of time deleting them.

While this should not be a major issue once all the categories/links have settled into a fairly constant pattern, but is there a way Links can be made to delete the no longer used files/directories when it builds?

It is hard to find a category which is 5 levels deep for example, which I deleted and forgot about. I can see over time a LOT of uneccessary files and folder building up on my server.

If I have completley got all this wrong, someone please tell me!

Thanks.Smile


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [sooke] Build Question / Advice In reply to
The only real way I know of to do this, is to hack nph-build.cgi to first spider the folders, and then delete everything...then re-build everything...

To be honest, it really isn't worth the effort Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [sooke] Build Question / Advice In reply to
>>
Each time I re-build my static pages, old directory and files which are no longer used are not removed.
<<

I'm not sure it is possible to keep track of old files....how can Links SQL know what is being used and what isn't?

>>
I found this out when I made about 200 categories in the root by mastake and spent a bit of time deleting them.
<<

shell> rm -r /path/to/pages/*

Takes about 2 seconds Angelic.

Last edited by:

Paul: Apr 3, 2002, 11:54 AM
Quote Reply
Re: [Paul] Build Question / Advice In reply to
Thanks Andy and Paul.

I am thinking that, I could maybe once a month delete all the folders (at night or a quiet period) and re-build... I guess that would do it.

Thanks for the quick folder delete command too!
Quote Reply
Re: [sooke] Build Question / Advice In reply to
Remeber not to add the shell> bit
Quote Reply
Re: [Paul] Build Question / Advice In reply to
I had the same problem under Links 2.0.
There are 2 solutions: a) using dynamic pages b) using a cleaning solution.
I thinked about a cleaning solution. I had a good solution, but I did not have time to implement it.

The solution could be to check once a week, for unused files.
We save the list of last built files, and we delete all files, which are not on this list, but exists in the directories.
But be aware, that this works only by using the Build All feature.
Using the Build Changed, it will delete the older, but still useful files.

Would be fine to have such feature, but the question is: Is it worth to implement or not?

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...

Last edited by:

webmaster33: Apr 3, 2002, 10:07 PM
Quote Reply
Re: [webmaster33] Build Question / Advice In reply to
Sounds like a reasonable way to solve this (2).

I think it is worth the trouble if you have a big database and limited space, or you are just super orgaized or funny about having a "clean" directory like me.
Quote Reply
Re: [sooke] Build Question / Advice In reply to
I will put on my list, but don't expect result in near future.

Workarounds:
But until this will be not available, and you have very limited space, not too big traffic, then you can use the dynamic mode to display pages or clean up regularly once a week or month.
This saves you a lot space.

I understand that is important for you, but this problem can have some workarounds...while others what I'm working on not... I had this problem, too, and I have choosen the dynamic mode as workaround.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [sooke] Build Question / Advice In reply to
The one issue with this is many people set the build root to their webdocs. You would not be able to use this unless the program knows for sure that there are no directories in build_root_url that are not related to Links SQL.

A possible solution is upon every deletion of a category, store the name somewhere and have a script that cleans up those categories.

Would definately have to be optional, as many people want the search engine links preserved.

Cheers,

Alex
--
Gossamer Threads Inc.