[Clipart] Help with the script - was: Re: A couple of server problems

Nicu Buculei nicu_gfx at nicubunu.ro
Wed Feb 20 01:10:50 PST 2008


Frederik Elwert wrote:
> I haven't tried it, but I think xargs might be the wrong choice. It may
> call tar multiple times, each time with some of the arguments. This
> results in a final archive containing only the last files.
> 
> You could use tar's -T/--files-from parameter to read the files from
> filelist.txt

Thanks Frederik, it worked!

Now on http://download.openclipart.org/downloads/ is a tarball named 
daily_SVG_snapshot.tar.bz2 which can be downloaded to get a snapshot of 
the current submissions. It is quite large, 156 MB, will extracting 
about 600MB and contains over 8000 images (some submissions have more 
than one single SVG).
I submitted a support request and it will be set to be updated daily.

If someone can help wit a better version of the script, it will be 
appreciated.

The problem is: we have a directory  named "people" containing a lot of 
files and subdirectories.
The files in the root of the directory are not interesting, they are 
failed uploads and temporary files. The subdirectories contain clipart 
files (svg and svgz) and other not needed files (png, jpg, whatever - 
avatars, screenshots, thumbnails).
We need a tarball containing *only* the SVG and SVGZ files from 
*subdirectories* and nothing else (the size is already large).

I did it by running a find for *.svg and another for *.svgz, dump the 
result in a text file and run tar with this text file as an input list.

The weakness is that creating this tarball take a noticeable time (a few 
minutes) and if some user deletes or renames an existing file (included 
in that dumped find result) the tar operation will fail (it happened to 
me the other day). Any idea?

-- 
nicu :: http://nicubunu.ro :: http://nicubunu.blogspot.com
Open Clip Art Library: http://www.openclipart.org
my cool Fedora wallpapers: http://fedora.nicubunu.ro/wallpapers/
my clipart collection: http://clipart.nicubunu.ro/



More information about the clipart mailing list