I renamed some jpeg image files through command line and all went perfect except one thing that some images do not have thumb nail and shows 0 bytes on checking their properties but are still getting viewed in eog. Moreover when I check their properties from exiftool and identify, everything seems normal. This anomaly has not caused me problem(yet) but I was wondering why were they behaving like this.

I executed following line on terminal to rename my files

for subdir in *;do for f in $subdir/*;do mv $f "$subdir"_150dpi_"${f:5:15}" ;done;done

The output (not all) after ls -l is:

total 90800 -rw-r--r-- 1 muhammad muhammad 413958 Nov 9 2018 b203_150dpi_25.jpg -rw-r--r-- 1 muhammad muhammad 434711 Nov 9 2018 b203_150dpi_31.jpg -rw-r--r-- 1 muhammad muhammad 450432 Nov 9 2018 b203_150dpi_32.jpg -rw-r--r-- 1 muhammad muhammad 427775 Nov 9 2018 b203_150dpi_41.jpg -rw-r--r-- 1 muhammad muhammad 313645 Nov 12 2018 b209_150dpi_12.jpg -rw-r--r-- 1 muhammad muhammad 300690 Nov 12 2018 b209_150dpi_15.jpg -rw-r--r-- 1 muhammad muhammad 226017 Nov 12 2018 b209_150dpi_17.jpg -rw-r--r-- 1 muhammad muhammad 296103 Nov 12 2018 b209_150dpi_23.jpg -rw-r--r-- 1 muhammad muhammad 292266 Nov 12 2018 b209_150dpi_8.jpg -rw-r--r-- 1 muhammad muhammad 343003 Nov 12 2018 b210_150dpi_118.jpg -rw-r--r-- 1 muhammad muhammad 400393 Nov 12 2018 b210_150dpi_13.jpg -rw-r--r-- 1 muhammad muhammad 409259 Nov 12 2018 b210_150dpi_20.jpg

I am using ubuntu 18.06 and GNOME nautilus 3.26.4.

edit: The problematic files are now behaving okey i.e showing thumbnail and memory in file manager. But still don't know why they were behaving wrongly before or behaving correctly now? May be nautilus takes some time to show image thumbnail and its size.

  • The output for memory is also looked normal when checked from ls -l – Naeem Jul 3 at 13:22
  • 1
    You mean the file properties from eog ? Seems it generated thumbs and information right in the moment when the file was created but not yet written to it and it doesn't notice if that changes. On removing eog cache and cleaning thumbnails it should work again. – pLumo Jul 3 at 13:23
  • From eog , I meant that they were getting displayed in Gnome image viewer. – Naeem Jul 3 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.