Menu

Tree [5113c8] master /
 History

HTTPS access


File Date Author Commit
 README.md 2014-09-18 arrange arrange [5113c8] README enh
 gnome_thumb_remover.c 2014-09-18 arrange arrange [7fc3ea] better messaging + README

Read Me

gtrm - gnome thumbnail remover

Description

gnome thumbnail analyser and remover

  • goes through files and/or directories (not recursively) and looks for thumbnail files.
    In their metadata it gets the path to the original file.
  • if the original file doesn't exist, or the file is not a regular file (scheme different from 'file:///'),
    prints the thumbnail out or (if -r specified) removes it.

How to install

  • Download the gnome_thumb_remover.c file
  • Run this command to compile the code, and move the binary to /usr/local/bin/ (remove the sudo command if you are already root)

gcc -O2 -Wall -o gtrm gnome_thumb_remover.c && sudo mv gtrm /usr/local/bin/gtrm && sudo chown root:root /usr/local/bin/gtrm

  • Run gtrm

gtrm ~/.thumbnail/normal

The command line

Usage: ./gtrm [option] FILE|DIR [FILE|DIR] ...

  -f | --format <format>   ... the format of the output (see below) (default: 'both' for files to be removed)
  -q | --quiet             ... no output with the exception of errors (default: only print the files to be removed)
  -u | --print-URI         ... print full file URI (default: just the path)
  -a | --print-all         ... print out all files (default: only print the files to be removed)
  -k | --keep-nonfile      ... don't remove other than 'file:' files (default: remove all 'trash:' and other schemes)
  -r | --remove            ... remove superfluous files (default: just print them out)
  -i | --interactive       ... ask before each removal, implies --remove (default: no questions asked)
  -v | --verbose           ... be a bit more verbose (implies --print-all and --print-URI)
  -d | --debug             ... same as --verbose
  -h | --help              ... display this help and exit

Examples

# list the files which could be removed
$ ./gtrm ~/.thumbnails/normal
105d94d97c4b36260f4754cce37bc449.png -> trash:///test.jpg *** TO BE REMOVED ***
cc7ddf14361598313ebf3b7cbda0465d.png -> /media/30D4-E958/alive.mp4 *** TO BE REMOVED ***

# the same as above, use file expansion
$ ./gtrm ~/.thumbnails/normal/*
~/.thumbnails/normal/105d94d97c4b36260f4754cce37bc449.png -> trash:///test.jpg *** TO BE REMOVED ***
~/.thumbnails/normal/cc7ddf14361598313ebf3b7cbda0465d.png -> /media/30D4-E958/alive.mp4 *** TO BE REMOVED ***

# list & remove
$ ./gtrm -r ~/.thumbnails/normal
~/.thumbnails/normal/105d94d97c4b36260f4754cce37bc449.png -> trash:///test.jpg --- removed ---
~/.thumbnails/normal/cc7ddf14361598313ebf3b7cbda0465d.png -> /media/30D4-E958/alive.mp4 --- removed ---
MongoDB Logo MongoDB