[ale] Bulk jpg Thumbnail production from 137000 jp2 files??

Brian Mathis brian.mathis+ale at betteradmin.com
Wed Feb 20 10:53:39 EST 2013


I'm not sure what that "*.jpg" is meant to do, but I don't think it is
doing what you expect.  Bash is going to try to expand it in the
current directory before executing the command, and if it doesn't find
a match it will use the literal '*.jpg' as you have seen it doing.

I would use a for loop for this instead:
    for img in `find -type f -name "*.jp2"'
    do
        convert $img -resize 14% ${img%.*}.jpg
    done

This allows you to manipulate the destination file name more
precisely.  Be careful if your filenames have spaces in them though.


❧ Brian Mathis


On Wed, Feb 20, 2013 at 9:31 AM, Wolf Halton <wolf.halton at gmail.com> wrote:
> Hi James - Thanks.
> Works, but I am trying to convert files in sub-folders
> find -type f -name "*.jp2" -exec convert {} -resize 14% *.jpg \;
> was doing something, but basically it took each image in order and created a
> file called *.jpg in the parent directory, over and over. Looking at it in
> image-viewer is like watch ing a slow slide show, as the image changes.
>
> On Wed, Feb 20, 2013 at 9:24 AM, James Sumners <james.sumners at gmail.com>
> wrote:
>>
>> https://en.wikipedia.org/wiki/ImageMagick
>>
>> On Wed, Feb 20, 2013 at 9:07 AM, Wolf Halton <wolf.halton at gmail.com>
>> wrote:
>> > I have been poking around, and gui-graphics apps will do the job, but I
>> > need
>> > a monastery full of dedicated monks to work on it for a couple of years.
>> > I
>> > had a product on *That other OS*(tm) that could do this, but I am on
>> > Debian
>> > Wheezy and don't want to ship the drives all the way across from this
>> > cubicle to the other, or install samba on the Debian machine to mount
>> > the
>> > drives on the machine with *That other OS*(tm).
>> >
>> > Wolf Halton
>>
>> James Sumners
>
> Wolf Halton



More information about the Ale mailing list