convert png to piled tif (all files in a folder)

for file in /data/admin/web/data/vivastreet/image/50b7814*;
do newname=`basename "$file" png`tif;
convert $file -define tiff:tile-geometry=256x256 -compress jpeg "ptif:/mnt/data/vivastreet/$newname";
done

well, this will rename the *.png to *.tif and convert them .
further more, if you wann only list 100 file in a folder:

ls | head -n 100


if you wanna to remove them:

ls | head -n 100 | xargs rm

评论

热门博文