Created
July 19, 2022 06:01
-
-
Save jishanshaikh4/facb5763441abfb05172e2acd2ac4a70 to your computer and use it in GitHub Desktop.
Find thumbnails for a file in Linux (Solved: Set cache size of thumbnails in dconf-editor)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find_thumbnail(){ | |
full_path="file://$(realpath -s "$1")" | |
md5name=$(printf %s "${full_path// /%20}" | md5sum) | |
find ~/.thumbnails/ ~/.cache/thumbnails/ -name "${md5name%% *}.png" | |
} | |
Usage: | |
====== | |
find_thumbnail /path/to/file.bmp | |
find_thumbnail ~/Pictures/file.jpg | |
find_thumbnail file.jpg | |
find_thumbnail "file with spaces.tif" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment