Resizing Thumbnails - Deleting LOTS of Thumbnails

Phoca Gallery - image gallery extension
linux4me
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 01 Dec 2009, 23:52

Resizing Thumbnails - Deleting LOTS of Thumbnails

Post by linux4me »

I recently migrated a client from Easygallery to Phocagallery. They have 5,000+ images and a lot of categories, so there were way too many thumbs folders for me to go through an manually delete them all. I thought I would share my solution in case anyone else finds themselves needing to do so.

You will of course have followed this tutorial to set your new thumbnail sizes first.

Fortunately, I have SSH access to the web server. That's how this works. It just takes a couple of simple Linux commands once you are logged on to your server via your favorite terminal:

Code: Select all

cd public_html/images/phocagallery
That gets you to the typical location of your Phocagallery files. Next:

Code: Select all

find -name thumbs -exec rm -rf {} \;
That finds all the folders named "thumbs" and then removes all the files they contain as well as the folders themselves without prompting you to see if you want to delete them or not.

The whole thing takes two seconds.

P.S. Thanks for all your time developing Phocagallery!
Last edited by linux4me on 06 Mar 2010, 23:00, edited 1 time in total.
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49297
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: [SOLVED] Resizing Thumbnails - Deleting LOTS of Thumbnails

Post by Jan »

Ok
If you find Phoca extensions useful, please support the project
linux4me
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 01 Dec 2009, 23:52

Re: [SOLVED] Resizing Thumbnails - Deleting LOTS of Thumbnails

Post by linux4me »

Thanks, Jan. I just did.
Post Reply