If you want to get data (in JPG) from your RAW file in Ubuntu/Linux, do next:
1) Install exiftool in your Linux system:
sudo apt install exiftool
2) not necessary step: view your RAW file data:
exiftool -s2 -all -b -X -fXMP:XMP foto.cr2
3) not necessary step: near the bottom, it will shows:
Composite:PreviewImage='(Binary data 1706501 bytes, use -b option to extract)'
Composite:ThumbnailImage='(Binary data 17031 bytes, use -b option to extract)'
4) Use the "-b" option to extract either or both:
exiftool -Composite:PreviewImage -b foto.cr2 >preview.jpg
exiftool -Composite:ThumbnailImage -b foto.cr2 >thumb.jpg
5) To extract data from all files in the folder, do next:
for i in *.CR2; do exiftool -Composite:PreviewImage -b $i > $i.jpg; done
6) Done. We did execute all JPG data from RAW files:
How to resize your photos from Ubuntu (Lunux) console with ImageMagick?
for i in *.JPG; do convert -quality 100 -resize 30% $i $i; done
Для каждого $i в формате JPG > конвертируем в качество 100% + ресайз 30% от оригинала, перезаписываем файл $i в $i;
Получаем вместо 8mb фото, фото 1.2mb.