Forum Moderators: phranque
thanks!
So something like (back up first!)
cd /your/webroot
find ./ -atime +100 -exec rm -f {} \;
The atime option allows you to tell find to find files that were last accessed N days ago (in this case 100). Note that important files that are rarely accessed could still be deleted so use discretion.
Disclaimer: Not responsible if you blow away important files ;)
If your remote server is synced with your local files then I know you can use Dreamweaver to seek orphans (files that are not linked to another)
This is found:
> site menu
> check links site wide
> then select orphans
this will identify not only orphaned graphic files but other file types too.
Not sure how DW holds up to PHP & ASP includes and such - but I imagine there is other software with similar capability too.
[edited by: encyclo at 2:35 am (utc) on Dec. 23, 2006]
[edit reason] spliced from duplicate thread [/edit]